summaryrefslogtreecommitdiff
path: root/lib/workqueue.c
diff options
context:
space:
mode:
Diffstat (limited to 'lib/workqueue.c')
-rw-r--r--lib/workqueue.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/lib/workqueue.c b/lib/workqueue.c
index 3d481aa899..e997e61b32 100644
--- a/lib/workqueue.c
+++ b/lib/workqueue.c
@@ -126,8 +126,9 @@ work_queue_schedule (struct work_queue *wq, unsigned int delay)
&& (wq->thread == NULL)
&& (listcount (wq->items) > 0) )
{
- wq->thread = thread_add_background(wq->master, work_queue_run, wq,
- delay, NULL);
+ wq->thread = NULL;
+ thread_add_background(wq->master, work_queue_run, wq, delay,
+ &wq->thread);
/* set thread yield time, if needed */
if (wq->thread && wq->spec.yield != THREAD_YIELD_TIME_SLOT)
thread_set_yield_time (wq->thread, wq->spec.yield);