[sheepdog] [PATCH 1/2] work queue: allow null main thread
Liu Yuan
namei.unix at gmail.com
Mon Jul 1 18:35:27 CEST 2013
Signed-off-by: Liu Yuan <namei.unix at gmail.com>
---
lib/work.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/lib/work.c b/lib/work.c
index b09c0db..9adf622 100644
--- a/lib/work.c
+++ b/lib/work.c
@@ -193,7 +193,8 @@ static void worker_thread_request_done(int fd, int events, void *data)
work = list_first_entry(&list, struct work, w_list);
list_del(&work->w_list);
- work->done(work);
+ if (work->done)
+ work->done(work);
uatomic_dec(&wi->nr_workers);
}
}
--
1.7.9.5
More information about the sheepdog
mailing list