Allow threads to die from cooling state

This commit is contained in:
Rodrigo Arias 2022-09-08 12:36:22 +02:00
parent 65d8d985b7
commit a1378bbab5

View File

@ -334,8 +334,8 @@ pre_thread_execute(struct ovni_emu *emu, struct ovni_ethread *th)
static void static void
pre_thread_end(struct ovni_ethread *th) pre_thread_end(struct ovni_ethread *th)
{ {
if(th->state != TH_ST_RUNNING) if(th->state != TH_ST_RUNNING && th->state != TH_ST_COOLING)
die("pre_thread_end: thread %d not running\n", die("pre_thread_end: thread %d not running or cooling\n",
th->tid); th->tid);
if(th->cpu == NULL) if(th->cpu == NULL)