From: fennecdjay Date: Fri, 18 Nov 2022 11:17:04 +0000 (+0100) Subject: :art: shreduler cosmetics X-Git-Tag: nightly~207^2~83 X-Git-Url: http://10.10.0.4:5575/?a=commitdiff_plain;h=de64c11b61441fb982931445b3558af5c36ef849;p=gwion.git :art: shreduler cosmetics --- 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; }