From 3c38ec72e74dd60b81964ebf661f5d5af8724968 Mon Sep 17 00:00:00 2001 From: Stefan Metzmacher Date: Thu, 28 Jul 2011 09:46:34 +0200 Subject: tevent: add tevent_queue_running() function metze --- lib/tevent/tevent.h | 11 +++++++++++ lib/tevent/tevent_queue.c | 5 +++++ 2 files changed, 16 insertions(+) diff --git a/lib/tevent/tevent.h b/lib/tevent/tevent.h index 7ad566c69e..3b170a4dc8 100644 --- a/lib/tevent/tevent.h +++ b/lib/tevent/tevent.h @@ -1435,6 +1435,17 @@ void tevent_queue_stop(struct tevent_queue *queue); */ size_t tevent_queue_length(struct tevent_queue *queue); +/** + * @brief Is the tevent queue running. + * + * The queue is started by default. + * + * @param[in] queue The queue. + * + * @return Wether the queue is running or not.. + */ +bool tevent_queue_running(struct tevent_queue *queue); + typedef int (*tevent_nesting_hook)(struct tevent_context *ev, void *private_data, uint32_t level, diff --git a/lib/tevent/tevent_queue.c b/lib/tevent/tevent_queue.c index 3715c35e4f..446804c9a5 100644 --- a/lib/tevent/tevent_queue.c +++ b/lib/tevent/tevent_queue.c @@ -215,3 +215,8 @@ size_t tevent_queue_length(struct tevent_queue *queue) { return queue->length; } + +bool tevent_queue_running(struct tevent_queue *queue) +{ + return queue->running; +} -- cgit