Add processing ready tasks support

This commit is contained in:
Rodrigo Arias 2022-09-08 13:40:50 +02:00
parent a1378bbab5
commit 008ba5a8ef
3 changed files with 4 additions and 0 deletions

1
emu.h
View File

@ -109,6 +109,7 @@ enum nanos6_ss_state {
ST_NANOS6_TASK_SPAWNING, ST_NANOS6_TASK_SPAWNING,
ST_NANOS6_SCHED_ADDING, ST_NANOS6_SCHED_ADDING,
ST_NANOS6_SCHED_SERVING, ST_NANOS6_SCHED_SERVING,
ST_NANOS6_SCHED_PROCESSING,
ST_NANOS6_DEP_REG, ST_NANOS6_DEP_REG,
ST_NANOS6_DEP_UNREG, ST_NANOS6_DEP_UNREG,
ST_NANOS6_BLK_TASKWAIT, ST_NANOS6_BLK_TASKWAIT,

View File

@ -424,6 +424,8 @@ pre_sched(struct ovni_emu *emu)
case ']': chan_pop (chan_th, ST_NANOS6_SCHED_SERVING); break; case ']': chan_pop (chan_th, ST_NANOS6_SCHED_SERVING); break;
case 'a': chan_push(chan_th, ST_NANOS6_SCHED_ADDING); break; case 'a': chan_push(chan_th, ST_NANOS6_SCHED_ADDING); break;
case 'A': chan_pop (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 '@': chan_ev (chan_th, EV_NANOS6_SCHED_SELF); break;
case 'r': chan_ev (chan_th, EV_NANOS6_SCHED_RECV); break; case 'r': chan_ev (chan_th, EV_NANOS6_SCHED_RECV); break;
case 's': chan_ev (chan_th, EV_NANOS6_SCHED_SEND); break; case 's': chan_ev (chan_th, EV_NANOS6_SCHED_SEND); break;

1
pcf.c
View File

@ -181,6 +181,7 @@ struct pcf_value_label nanos6_ss_values[] = {
{ ST_NANOS6_TASK_SPAWNING, "Task: Spawning function" }, { ST_NANOS6_TASK_SPAWNING, "Task: Spawning function" },
{ ST_NANOS6_SCHED_SERVING, "Scheduler: Serving tasks" }, { ST_NANOS6_SCHED_SERVING, "Scheduler: Serving tasks" },
{ ST_NANOS6_SCHED_ADDING, "Scheduler: Adding ready 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_REG, "Dependency: Registering" },
{ ST_NANOS6_DEP_UNREG, "Dependency: Unregistering" }, { ST_NANOS6_DEP_UNREG, "Dependency: Unregistering" },
{ ST_NANOS6_BLK_TASKWAIT, "Blocking: Taskwait" }, { ST_NANOS6_BLK_TASKWAIT, "Blocking: Taskwait" },