diff options
| author | Russ White <russ@riw.us> | 2017-05-10 13:51:47 -0400 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2017-05-10 13:51:47 -0400 |
| commit | 00a1578051ceeb26b0b9c2c3344cac1f202e047d (patch) | |
| tree | 248b55b1ab56e39025d9902c53564286558eda60 /lib/workqueue.c | |
| parent | 0896b755080b300116d493444bfc05e2ef7ca9f6 (diff) | |
| parent | c94671b82f790492ceee226f98a65ad7e7e09967 (diff) | |
Merge pull request #408 from qlyoung/remove-thread-macros
*: remove THREAD_ON macros, add nullity check
Diffstat (limited to 'lib/workqueue.c')
| -rw-r--r-- | lib/workqueue.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/lib/workqueue.c b/lib/workqueue.c index 51017b34ea..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); + 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); |
