From 008ba5a8ef7915a2a5c9f98d8679c9ad77735656 Mon Sep 17 00:00:00 2001 From: Rodrigo Arias Date: Thu, 8 Sep 2022 13:40:50 +0200 Subject: [PATCH] Add processing ready tasks support --- emu.h | 1 + emu_nanos6.c | 2 ++ pcf.c | 1 + 3 files changed, 4 insertions(+) diff --git a/emu.h b/emu.h index 574d9fa..3976ccc 100644 --- a/emu.h +++ b/emu.h @@ -109,6 +109,7 @@ enum nanos6_ss_state { ST_NANOS6_TASK_SPAWNING, ST_NANOS6_SCHED_ADDING, ST_NANOS6_SCHED_SERVING, + ST_NANOS6_SCHED_PROCESSING, ST_NANOS6_DEP_REG, ST_NANOS6_DEP_UNREG, ST_NANOS6_BLK_TASKWAIT, diff --git a/emu_nanos6.c b/emu_nanos6.c index bda4043..6576bc5 100644 --- a/emu_nanos6.c +++ b/emu_nanos6.c @@ -424,6 +424,8 @@ pre_sched(struct ovni_emu *emu) case ']': chan_pop (chan_th, ST_NANOS6_SCHED_SERVING); break; case 'a': chan_push(chan_th, ST_NANOS6_SCHED_ADDING); break; case 'A': chan_pop (chan_th, ST_NANOS6_SCHED_ADDING); break; + case 'p': chan_push(chan_th, ST_NANOS6_SCHED_PROCESSING); break; + case 'P': chan_pop (chan_th, ST_NANOS6_SCHED_PROCESSING); break; case '@': chan_ev (chan_th, EV_NANOS6_SCHED_SELF); break; case 'r': chan_ev (chan_th, EV_NANOS6_SCHED_RECV); break; case 's': chan_ev (chan_th, EV_NANOS6_SCHED_SEND); break; diff --git a/pcf.c b/pcf.c index e03140d..17e5b30 100644 --- a/pcf.c +++ b/pcf.c @@ -181,6 +181,7 @@ struct pcf_value_label nanos6_ss_values[] = { { ST_NANOS6_TASK_SPAWNING, "Task: Spawning function" }, { ST_NANOS6_SCHED_SERVING, "Scheduler: Serving tasks" }, { ST_NANOS6_SCHED_ADDING, "Scheduler: Adding ready tasks" }, + { ST_NANOS6_SCHED_PROCESSING, "Scheduler: Processing ready tasks" }, { ST_NANOS6_DEP_REG, "Dependency: Registering" }, { ST_NANOS6_DEP_UNREG, "Dependency: Unregistering" }, { ST_NANOS6_BLK_TASKWAIT, "Blocking: Taskwait" },