From 13c2a3db503fde67f647fa58fd4e1077517ebb5c Mon Sep 17 00:00:00 2001 From: Paul Jakma Date: Tue, 15 Sep 2015 16:16:42 +0100 Subject: lib/workqueue: Add trivial work_queue_is_scheduled helper --- lib/workqueue.c | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'lib/workqueue.c') diff --git a/lib/workqueue.c b/lib/workqueue.c index e09d009f..9fc89314 100644 --- a/lib/workqueue.c +++ b/lib/workqueue.c @@ -107,6 +107,12 @@ work_queue_free (struct work_queue *wq) return; } +bool +work_queue_is_scheduled (struct work_queue *wq) +{ + return (wq->thread != NULL); +} + static int work_queue_schedule (struct work_queue *wq, unsigned int delay) { -- cgit v1.2.3