Add support for Nanos6 signal event

This commit is contained in:
Rodrigo Arias 2022-09-08 09:51:39 +02:00
parent 8e690f0e44
commit 6329c8c982
3 changed files with 3 additions and 0 deletions

1
emu.h
View File

@ -130,6 +130,7 @@ enum nanos6_ss_state {
EV_NANOS6_SCHED_SELF,
EV_NANOS6_CPU_IDLE,
EV_NANOS6_CPU_ACTIVE,
EV_NANOS6_SIGNAL,
};
enum nanos6_thread_type {

View File

@ -383,6 +383,7 @@ pre_worker(struct ovni_emu *emu)
case 'S': chan_pop (chan_th, ST_NANOS6_SUSPEND); break;
case 'r': chan_push(chan_th, ST_NANOS6_RESUME); break;
case 'R': chan_pop (chan_th, ST_NANOS6_RESUME); break;
case '*': chan_ev (chan_th, EV_NANOS6_SIGNAL); break;
default:
edie(emu, "unknown Nanos6 worker event\n");
}

1
pcf.c
View File

@ -200,6 +200,7 @@ struct pcf_value_label nanos6_ss_values[] = {
{ EV_NANOS6_SCHED_SELF, "EV Scheduler: Self-assign task" },
{ EV_NANOS6_CPU_IDLE, "EV CPU: Becomes idle" },
{ EV_NANOS6_CPU_ACTIVE, "EV CPU: Becomes active" },
{ EV_NANOS6_SIGNAL, "EV Worker: Wakening another thread" },
{ -1, NULL },
};