From de64c11b61441fb982931445b3558af5c36ef849 Mon Sep 17 00:00:00 2001 From: fennecdjay Date: Fri, 18 Nov 2022 12:17:04 +0100 Subject: [PATCH] :art: shreduler cosmetics --- src/vm/shreduler.c | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/src/vm/shreduler.c b/src/vm/shreduler.c index 00de675f..42ed83db 100644 --- a/src/vm/shreduler.c +++ b/src/vm/shreduler.c @@ -76,7 +76,7 @@ ANN void shreduler_remove(const Shreduler s, const VM_Shred out, MUTEX_UNLOCK(s->mutex); } -ANN void _shredule(const Shreduler s, struct ShredTick_ *tk, +ANN static void _shredule(const Shreduler s, struct ShredTick_ *tk, const m_float wake_time) { if(tk->prev == (struct ShredTick_*)-1) return; const m_float time = wake_time + (m_float)s->bbq->pos; @@ -89,14 +89,13 @@ ANN void _shredule(const Shreduler s, struct ShredTick_ *tk, } while ((curr = curr->next)); if (!prev) { tk->next = s->list; - s->list = (s->list->prev = tk); + s->list = s->list->prev = tk; } else { if ((tk->next = prev->next)) prev->next->prev = tk; tk->prev = prev; prev->next = tk; } - } else - s->list = tk; + } else s->list = tk; if (tk == s->curr) s->curr = NULL; } -- 2.43.0