summaryrefslogtreecommitdiff
path: root/evmap-internal.h
diff options
context:
space:
mode:
authorNick Mathewson <nickm@torproject.org>2012-02-20 13:56:13 -0500
committerNick Mathewson <nickm@torproject.org>2012-02-20 13:56:13 -0500
commit8dbcf8d62ba0e1c5b408e22babe55e9490ea2404 (patch)
tree4e5f94801a3b0064ef2b0bc4893ed2410d22e644 /evmap-internal.h
parent65bc91c210b75ae924111919eee56ec54ecd27ee (diff)
parentcad5753587c1b4bed7b76f6572a9205f4f2d3ac9 (diff)
downloadlibevent-8dbcf8d62ba0e1c5b408e22babe55e9490ea2404.tar.gz
Merge branch '21_eventlist_v3_squashed'
Diffstat (limited to 'evmap-internal.h')
-rw-r--r--evmap-internal.h26
1 files changed, 24 insertions, 2 deletions
diff --git a/evmap-internal.h b/evmap-internal.h
index fd842676..77f26129 100644
--- a/evmap-internal.h
+++ b/evmap-internal.h
@@ -85,11 +85,33 @@ int evmap_signal_add(struct event_base *base, int signum, struct event *ev);
int evmap_signal_del(struct event_base *base, int signum, struct event *ev);
void evmap_signal_active(struct event_base *base, evutil_socket_t signum, int ncalls);
+/* Return the fdinfo object associated with a given fd. If the fd has no
+ * events associated with it, the result may be NULL.
+ */
void *evmap_io_get_fdinfo(struct event_io_map *ctx, evutil_socket_t fd);
-int evmap_io_reinit(struct event_base *base);
-int evmap_signal_reinit(struct event_base *base);
+/* Helper for event_reinit(): Tell the backend to re-add every fd and signal
+ * for which we have a pending event.
+ */
+int evmap_reinit(struct event_base *base);
+
+/* Helper for event_base_free(): Call event_del() on every pending fd and
+ * signal event.
+ */
+void evmap_delete_all(struct event_base *base);
+/* Helper for event_base_assert_ok(): Check referential integrity of the
+ * evmaps.
+ */
void evmap_check_integrity(struct event_base *base);
+/* Helper: Call fn on every fd or signal event, passing as its arguments the
+ * provided event_base, the event, and arg. If fn returns 0, process the next
+ * event. If it returns any other value, return that value and process no
+ * more events.
+ */
+int evmap_foreach_event(struct event_base *base,
+ event_base_foreach_event_cb fn,
+ void *arg);
+
#endif /* _EVMAP_H_ */