Use 6t events for subsystem transition

No longer mix task state transitions (6T) with subsystem changes.
This commit is contained in:
Rodrigo Arias 2022-09-21 17:30:23 +02:00
parent 394910daa7
commit b44c245405
2 changed files with 7 additions and 27 deletions

View File

@ -178,6 +178,12 @@ KCI Is back in the CPU due to a context switch
6F[ Begins to spawn a function via spawnFunction()
6F] Ends spawning a function
6t[ Begins running the task body
6t] Ends running the task body
6O[ Begins running the task body as taskfor collaborator
6O] Ends running the task body as taskfor collaborator
6Dr Begins the registration of a task's accesses
6DR Ends the registration of a task's accesses
6Du Begins the unregistration of a task's accesses

View File

@ -77,30 +77,6 @@ hook_init_nanos6(struct ovni_emu *emu)
/* --------------------------- pre ------------------------------- */
static void
update_ss_channel(struct ovni_emu *emu, int tr)
{
struct ovni_ethread *th = emu->cur_thread;
struct ovni_chan *chan = &th->chan[CHAN_NANOS6_SUBSYSTEM];
switch(tr)
{
case 'x':
case 'X':
chan_push(chan, ST_NANOS6_TASK_BODY);
break;
case 'e':
case 'E':
chan_pop(chan, ST_NANOS6_TASK_BODY);
break;
case 'r':
case 'p':
break;
default:
edie(emu, "unexpected transition value %c\n", tr);
}
}
static void
chan_task_stopped(struct ovni_emu *emu)
{
@ -287,9 +263,6 @@ update_task(struct ovni_emu *emu)
/* Update the task related channels now */
update_task_channels(emu, tr, prev, next);
/* Update the subsystem channel */
update_ss_channel(emu, tr);
enforce_task_rules(emu, tr, prev, next);
}
@ -552,6 +525,7 @@ hook_pre_nanos6(struct ovni_emu *emu)
case 'U': pre_ss(emu, ST_NANOS6_TASK_SUBMIT); break;
case 'F': pre_ss(emu, ST_NANOS6_TASK_SPAWNING); break;
case 'O': pre_ss(emu, ST_NANOS6_TASK_FOR); break;
case 't': pre_ss(emu, ST_NANOS6_TASK_BODY); break;
case 'H': pre_thread(emu); break;
case 'D': pre_deps(emu); break;
case 'B': pre_blocking(emu); break;