summaryrefslogtreecommitdiff
path: root/lib/tevent
diff options
context:
space:
mode:
authorStefan Metzmacher <metze@samba.org>2011-07-28 09:46:34 +0200
committerStefan Metzmacher <metze@samba.org>2011-08-09 21:37:40 +0200
commit3c38ec72e74dd60b81964ebf661f5d5af8724968 (patch)
treef61648b45c13805b2206899fc48fd07c343731d6 /lib/tevent
parent1e76662ae6aa77d7b6e9e8a0266fcb1a1320a7fb (diff)
downloadsamba-3c38ec72e74dd60b81964ebf661f5d5af8724968.tar.gz
samba-3c38ec72e74dd60b81964ebf661f5d5af8724968.tar.bz2
samba-3c38ec72e74dd60b81964ebf661f5d5af8724968.zip
tevent: add tevent_queue_running() function
metze
Diffstat (limited to 'lib/tevent')
-rw-r--r--lib/tevent/tevent.h11
-rw-r--r--lib/tevent/tevent_queue.c5
2 files changed, 16 insertions, 0 deletions
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;
+}