From 7d88315fea1448fc3f0e33c7a8a00ec12458b473 Mon Sep 17 00:00:00 2001 From: Kenny Levinsen Date: Mon, 31 Aug 2020 01:33:41 +0200 Subject: poller: Make event sources opaque --- seatd/poller.c | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) (limited to 'seatd') diff --git a/seatd/poller.c b/seatd/poller.c index f786d47..0631f4b 100644 --- a/seatd/poller.c +++ b/seatd/poller.c @@ -10,6 +10,30 @@ #include "list.h" #include "poller.h" +struct event_source_fd { + const struct event_source_fd_impl *impl; + event_source_fd_func_t func; + + int fd; + uint32_t mask; + void *data; + + struct poller *poller; + bool killed; +}; + +struct event_source_signal { + const struct event_source_signal_impl *impl; + event_source_signal_func_t func; + + int signal; + void *data; + + struct poller *poller; + bool raised; + bool killed; +}; + /* Used for signal handling */ struct poller *global_poller = NULL; -- cgit v1.2.3