From a1378bbab5860e85571933c6274552e79ad0dd81 Mon Sep 17 00:00:00 2001 From: Rodrigo Arias Date: Thu, 8 Sep 2022 12:36:22 +0200 Subject: [PATCH] Allow threads to die from cooling state --- emu_ovni.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/emu_ovni.c b/emu_ovni.c index cd4a3b6..c5a97ef 100644 --- a/emu_ovni.c +++ b/emu_ovni.c @@ -334,8 +334,8 @@ pre_thread_execute(struct ovni_emu *emu, struct ovni_ethread *th) static void pre_thread_end(struct ovni_ethread *th) { - if(th->state != TH_ST_RUNNING) - die("pre_thread_end: thread %d not running\n", + if(th->state != TH_ST_RUNNING && th->state != TH_ST_COOLING) + die("pre_thread_end: thread %d not running or cooling\n", th->tid); if(th->cpu == NULL)