summaryrefslogtreecommitdiff
path: root/lib/workqueue.c
diff options
context:
space:
mode:
authorPhilippe Guibert <philippe.guibert@6wind.com>2018-03-09 18:05:03 +0100
committerGitHub <noreply@github.com>2018-03-09 18:05:03 +0100
commit58e7db106d5907cb129fcc316f02ce0bf34e3885 (patch)
tree2d7e276495810fae9059b4e84694d994360b14a2 /lib/workqueue.c
parentc67667e74cfbb4e4f2edd3b70609cf9716d5c432 (diff)
parentb6c5d34354c7153bebd2c51e89fd2e32f0dc343c (diff)
Merge pull request #1813 from donaldsharp/pbr_setup
Pbr setup
Diffstat (limited to 'lib/workqueue.c')
-rw-r--r--lib/workqueue.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/lib/workqueue.c b/lib/workqueue.c
index d4ff3ee6ce..1af51c06c1 100644
--- a/lib/workqueue.c
+++ b/lib/workqueue.c
@@ -101,7 +101,7 @@ struct work_queue *work_queue_new(struct thread_master *m,
return new;
}
-void work_queue_free(struct work_queue *wq)
+void work_queue_free_original(struct work_queue *wq)
{
if (wq->thread != NULL)
thread_cancel(wq->thread);
@@ -119,6 +119,12 @@ void work_queue_free(struct work_queue *wq)
return;
}
+void work_queue_free_and_null(struct work_queue **wq)
+{
+ work_queue_free_original(*wq);
+ *wq = NULL;
+}
+
bool work_queue_is_scheduled(struct work_queue *wq)
{
return (wq->thread != NULL);