summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--otherlibs/threads/scheduler.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/otherlibs/threads/scheduler.c b/otherlibs/threads/scheduler.c
index 49534b2a4..16e58f8c4 100644
--- a/otherlibs/threads/scheduler.c
+++ b/otherlibs/threads/scheduler.c
@@ -168,9 +168,9 @@ value thread_new(clos) /* ML */
th->delay = NO_DELAY;
th->joining = NO_JOINING;
/* Insert thread in doubly linked list of threads */
- Assign(th->prev, curr_thread->prev);
+ th->prev = curr_thread->prev;
+ th->next = curr_thread;
Assign(curr_thread->prev->next, th);
- Assign(th->next, curr_thread);
Assign(curr_thread->prev, th);
/* Return thread */
return (value) th;