tevent: add tevent_queue_running() function
authorStefan Metzmacher <metze@samba.org>
Thu, 28 Jul 2011 07:46:34 +0000 (09:46 +0200)
committerStefan Metzmacher <metze@samba.org>
Tue, 9 Aug 2011 14:17:09 +0000 (16:17 +0200)
metze

lib/tevent/tevent.h
lib/tevent/tevent_queue.c

index 7ad566c69ea08da73c243401df39ba5a30a15a3a..3b170a4dc8e02d7c0807c7fdc16ec1a0507b4f12 100644 (file)
@@ -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,
index 3715c35e4f3416d5d9ce47b8e7ccf333feb08eb4..446804c9a51e6cab027d30d1f7d769cc0197188c 100644 (file)
@@ -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;
+}