summaryrefslogtreecommitdiffstats
path: root/lib/tevent/tevent.h
diff options
context:
space:
mode:
authorStefan Metzmacher <metze@samba.org>2009-02-17 11:42:01 +0100
committerStefan Metzmacher <metze@samba.org>2009-02-26 14:22:12 +0100
commit3a1f24f286d4dba836b750122f571f831a794e4a (patch)
tree4d9cb4eca0169aee03a17d31c94ee382d1d562f9 /lib/tevent/tevent.h
parent2f4b8213206aebd7b101b9623f7cd0786a65f310 (diff)
downloadsamba-3a1f24f286d4dba836b750122f571f831a794e4a.tar.gz
samba-3a1f24f286d4dba836b750122f571f831a794e4a.tar.xz
samba-3a1f24f286d4dba836b750122f571f831a794e4a.zip
tevent: add tevent_queue infrastructure
metze
Diffstat (limited to 'lib/tevent/tevent.h')
-rw-r--r--lib/tevent/tevent.h22
1 files changed, 22 insertions, 0 deletions
diff --git a/lib/tevent/tevent.h b/lib/tevent/tevent.h
index 185a8fa193e..8c119ffb8ed 100644
--- a/lib/tevent/tevent.h
+++ b/lib/tevent/tevent.h
@@ -338,6 +338,28 @@ struct timeval tevent_timeval_add(const struct timeval *tv, uint32_t secs,
struct timeval tevent_timeval_current_ofs(uint32_t secs, uint32_t usecs);
+struct tevent_queue;
+
+struct tevent_queue *_tevent_queue_create(TALLOC_CTX *mem_ctx,
+ const char *name,
+ const char *location);
+
+#define tevent_queue_create(_mem_ctx, _name) \
+ _tevent_queue_create((_mem_ctx), (_name), __location__)
+
+typedef void (*tevent_queue_trigger_fn_t)(struct tevent_req *req,
+ void *private_data);
+bool tevent_queue_add(struct tevent_queue *queue,
+ struct tevent_context *ev,
+ struct tevent_req *req,
+ tevent_queue_trigger_fn_t trigger,
+ void *private_data);
+bool tevent_queue_start(struct tevent_queue *queue,
+ struct tevent_context *ev);
+void tevent_queue_stop(struct tevent_queue *queue);
+
+size_t tevent_queue_length(struct tevent_queue *queue);
+
#ifdef TEVENT_COMPAT_DEFINES
#define event_context tevent_context