From c82b95ff07345c1311357f02807e130341438186 Mon Sep 17 00:00:00 2001 From: Rodrigo Arias Mallo Date: Wed, 21 Sep 2022 17:31:28 +0200 Subject: [PATCH] Fix emu tests for taskfor and task body events --- test/emu/nanos6/blocking.c | 1 + test/emu/nanos6/instr_nanos6.h | 7 +++++++ test/emu/nanos6/nested-tasks.c | 1 + test/emu/nanos6/task-types.c | 1 + 4 files changed, 10 insertions(+) diff --git a/test/emu/nanos6/blocking.c b/test/emu/nanos6/blocking.c index c893b60..1747f5a 100644 --- a/test/emu/nanos6/blocking.c +++ b/test/emu/nanos6/blocking.c @@ -39,6 +39,7 @@ main(void) instr_nanos6_block_exit(); usleep(us); instr_nanos6_task_end(taskid); + instr_nanos6_task_body_exit(); instr_end(); diff --git a/test/emu/nanos6/instr_nanos6.h b/test/emu/nanos6/instr_nanos6.h index 04ad5f9..2e8d937 100644 --- a/test/emu/nanos6/instr_nanos6.h +++ b/test/emu/nanos6/instr_nanos6.h @@ -81,6 +81,12 @@ INSTR_0ARG(instr_nanos6_submit_task_exit, "6U]") INSTR_0ARG(instr_nanos6_spawn_function_enter, "6F[") INSTR_0ARG(instr_nanos6_spawn_function_exit, "6F]") +INSTR_0ARG(instr_nanos6_taskfor_start, "6O[") +INSTR_0ARG(instr_nanos6_taskfor_stop, "6O]") + +INSTR_0ARG(instr_nanos6_task_body_enter, "6t[") +INSTR_0ARG(instr_nanos6_task_body_exit, "6t]") + INSTR_0ARG(instr_nanos6_register_enter, "6Dr") INSTR_0ARG(instr_nanos6_register_exit, "6DR") INSTR_0ARG(instr_nanos6_unregister_enter, "6Du") @@ -115,6 +121,7 @@ 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_body_enter(); instr_nanos6_task_execute(id); } diff --git a/test/emu/nanos6/nested-tasks.c b/test/emu/nanos6/nested-tasks.c index 6621f3f..48503de 100644 --- a/test/emu/nanos6/nested-tasks.c +++ b/test/emu/nanos6/nested-tasks.c @@ -39,6 +39,7 @@ main(void) for(int i = ntasks - 1; i >= 0; i--) { instr_nanos6_task_end(i + 1); + instr_nanos6_task_body_exit(); instr_nanos6_handle_task_exit(); } diff --git a/test/emu/nanos6/task-types.c b/test/emu/nanos6/task-types.c index 918f57a..3c7ba95 100644 --- a/test/emu/nanos6/task-types.c +++ b/test/emu/nanos6/task-types.c @@ -36,6 +36,7 @@ main(void) instr_nanos6_task_create_and_execute(i + 1, (i % ntypes) + 1); usleep(500); instr_nanos6_task_end(i + 1); + instr_nanos6_task_body_exit(); } instr_end();