chiark / gitweb /
poll: Support deregistration from the main event loop
[secnet.git] / secnet.h
index 1e1e75c34783cfba6b797e4d9ffb4c6383c41044..b5028bbe86e4da2ad7a488f65e9afcbd6e42b1b7 100644 (file)
--- a/secnet.h
+++ b/secnet.h
@@ -216,8 +216,9 @@ typedef void afterpoll_fn(void *st, struct pollfd *fds, int nfds);
 /* Register interest in the main loop of the program. Before a call
    to poll() your supplied beforepoll function will be called. After
    the call to poll() the supplied afterpoll function will be called. */
-extern void register_for_poll(void *st, beforepoll_fn *before,
+struct poll_interest *register_for_poll(void *st, beforepoll_fn *before,
                              afterpoll_fn *after, cstring_t desc);
+void deregister_for_poll(struct poll_interest *i);
 
 /***** END of scheduling support */