diff --git a/test/emu/nosv/instr_nosv.h b/test/emu/nosv/instr_nosv.h index 48e90f5..ea0c187 100644 --- a/test/emu/nosv/instr_nosv.h +++ b/test/emu/nosv/instr_nosv.h @@ -33,5 +33,8 @@ INSTR_1ARG(instr_nosv_task_pause, "VTp", int32_t, id) INSTR_1ARG(instr_nosv_task_resume, "VTr", int32_t, id) INSTR_1ARG(instr_nosv_task_end, "VTe", int32_t, id) +INSTR_0ARG(instr_nosv_submit_enter, "VAs") +INSTR_0ARG(instr_nosv_submit_exit, "VAS") + #endif /* INSTR_NOSV_H */ diff --git a/test/emu/nosv/nested-tasks-bad.c b/test/emu/nosv/nested-tasks-bad.c index 7618ca7..dfb6d8f 100644 --- a/test/emu/nosv/nested-tasks-bad.c +++ b/test/emu/nosv/nested-tasks-bad.c @@ -14,6 +14,8 @@ main(void) uint32_t taskid = 1; instr_nosv_task_create(taskid, typeid); instr_nosv_task_execute(taskid); + /* Change subsystem to prevent duplicates */ + instr_nosv_submit_enter(); /* Run another nested task with same id (should fail) */ instr_nosv_task_execute(taskid); diff --git a/test/emu/nosv/nested-tasks.c b/test/emu/nosv/nested-tasks.c index 4fdbbab..5814a91 100644 --- a/test/emu/nosv/nested-tasks.c +++ b/test/emu/nosv/nested-tasks.c @@ -7,6 +7,8 @@ static void create_and_run(int32_t id, uint32_t typeid, int us) { instr_nosv_task_create(id, typeid); + /* Change subsystem to prevent duplicates */ + instr_nosv_submit_enter(); instr_nosv_task_execute(id); usleep(us); } @@ -26,8 +28,11 @@ main(void) create_and_run(i + 1, typeid, 500); /* End the tasks in the opposite order */ - for (int i = ntasks - 1; i >= 0; i--) + for (int i = ntasks - 1; i >= 0; i--) { instr_nosv_task_end(i + 1); + /* Change subsystem to prevent duplicates */ + instr_nosv_submit_exit(); + } instr_end();