summaryrefslogtreecommitdiffstats
path: root/lib/workqueue.c
diff options
context:
space:
mode:
authorPaul Jakma <paul@jakma.org>2015-09-15 17:16:42 +0200
committerDaniel Walton <dwalton@cumulusnetworks.com>2016-06-03 22:39:22 +0200
commit86582682c97820d8cebfe4a6c4b990d308010eec (patch)
tree770f205bdb5d71c92983dfd28b2aa148046af568 /lib/workqueue.c
parenttests: add testcli reference in/out & do DejaGNU (diff)
downloadfrr-86582682c97820d8cebfe4a6c4b990d308010eec.tar.xz
frr-86582682c97820d8cebfe4a6c4b990d308010eec.zip
lib/workqueue: Add trivial work_queue_is_scheduled helper
(cherry picked from commit 13c2a3db503fde67f647fa58fd4e1077517ebb5c)
Diffstat (limited to 'lib/workqueue.c')
-rw-r--r--lib/workqueue.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/lib/workqueue.c b/lib/workqueue.c
index a45a6fc09..3100b9938 100644
--- a/lib/workqueue.c
+++ b/lib/workqueue.c
@@ -108,6 +108,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)
{