From 6329c8c982ea078c237bc2f4febdfd1d1668a188 Mon Sep 17 00:00:00 2001 From: Rodrigo Arias Date: Thu, 8 Sep 2022 09:51:39 +0200 Subject: [PATCH] Add support for Nanos6 signal event --- emu.h | 1 + emu_nanos6.c | 1 + pcf.c | 1 + 3 files changed, 3 insertions(+) diff --git a/emu.h b/emu.h index f4d38da..574d9fa 100644 --- a/emu.h +++ b/emu.h @@ -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 { diff --git a/emu_nanos6.c b/emu_nanos6.c index 22450d9..8decea4 100644 --- a/emu_nanos6.c +++ b/emu_nanos6.c @@ -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"); } diff --git a/pcf.c b/pcf.c index 1037657..e03140d 100644 --- a/pcf.c +++ b/pcf.c @@ -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 }, };