From 2d5cf837453bca81fbbdf1e837e649865fda1e02 Mon Sep 17 00:00:00 2001 From: fennecdjay Date: Sat, 16 Jul 2022 17:41:47 +0200 Subject: [PATCH] :bug: Test shreduler --- src/vm/shreduler.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/vm/shreduler.c b/src/vm/shreduler.c index 7e558b78..4525b155 100644 --- a/src/vm/shreduler.c +++ b/src/vm/shreduler.c @@ -78,9 +78,10 @@ ANN void shreduler_remove(const Shreduler s, const VM_Shred out, ANN void shredule(const Shreduler s, const VM_Shred shred, const m_float wake_time) { + struct ShredTick_ *tk = shred->tick; + if(tk->prev == (struct ShredTick_*)-1) return; MUTEX_LOCK(s->mutex); const m_float time = wake_time + (m_float)s->bbq->pos; - struct ShredTick_ *tk = shred->tick; tk->wake_time = time; if (s->list) { struct ShredTick_ *curr = s->list, *prev = NULL; -- 2.43.0