diff --git a/test/emu/nanos6/instr_nanos6.h b/test/emu/nanos6/instr_nanos6.h index 386bca8..8920575 100644 --- a/test/emu/nanos6/instr_nanos6.h +++ b/test/emu/nanos6/instr_nanos6.h @@ -43,7 +43,8 @@ instr_nanos6_type_create(int32_t typeid) } INSTR_2ARG(instr_nanos6_task_create, "6Tc", int32_t, id, uint32_t, typeid) -INSTR_0ARG(instr_nanos6_task_create_end, "6TC") +INSTR_0ARG(instr_nanos6_task_create_begin, "6C[") +INSTR_0ARG(instr_nanos6_task_create_end, "6C]") INSTR_1ARG(instr_nanos6_task_execute, "6Tx", int32_t, id) INSTR_1ARG(instr_nanos6_task_pause, "6Tp", int32_t, id) INSTR_1ARG(instr_nanos6_task_resume, "6Tr", int32_t, id) @@ -52,6 +53,7 @@ INSTR_1ARG(instr_nanos6_task_end, "6Te", int32_t, id) static inline void instr_nanos6_task_create_and_execute(int32_t id, uint32_t typeid) { + instr_nanos6_task_create_begin(); instr_nanos6_task_create(id, typeid); instr_nanos6_task_create_end(); instr_nanos6_task_execute(id); diff --git a/test/emu/nanos6/nested-tasks-bad.c b/test/emu/nanos6/nested-tasks-bad.c index b5d8cc4..b16f98c 100644 --- a/test/emu/nanos6/nested-tasks-bad.c +++ b/test/emu/nanos6/nested-tasks-bad.c @@ -26,9 +26,8 @@ main(void) instr_nanos6_type_create(typeid); uint32_t taskid = 1; - instr_nanos6_task_create(taskid, typeid); - instr_nanos6_task_create_end(); - instr_nanos6_task_execute(taskid); + instr_nanos6_task_create_and_execute(taskid, typeid); + /* Run another nested task with same id (should fail) */ instr_nanos6_task_execute(taskid);