diff options
author | Kenny Levinsen <kl@kl.wtf> | 2020-08-03 01:15:20 +0200 |
---|---|---|
committer | Kenny Levinsen <kl@kl.wtf> | 2020-08-03 01:15:20 +0200 |
commit | 3f3bdd41dd774b65a6ee0ad63bf28a6e22e8908d (patch) | |
tree | 99fb97f8b45e18314890bd01087da9435330b651 /include/poller.h | |
parent | 4f4a17a2bdf959607d09e0972b26cfb2e14f5ecb (diff) |
poller: Remove unnecessary poll_impl abstraction
Diffstat (limited to 'include/poller.h')
-rw-r--r-- | include/poller.h | 23 |
1 files changed, 20 insertions, 3 deletions
diff --git a/include/poller.h b/include/poller.h index f867df9..b203181 100644 --- a/include/poller.h +++ b/include/poller.h @@ -4,6 +4,8 @@ #include <stdbool.h> #include <stdint.h> +#include "list.h" + struct poller; struct event_source_fd; struct event_source_signal; @@ -30,7 +32,7 @@ struct event_source_fd_impl { }; /** - * The fd poller base class. This must be created by poller_add_fd. + * The fd poller class. This must be created by poller_add_fd. */ struct event_source_fd { const struct event_source_fd_impl *impl; @@ -39,6 +41,9 @@ struct event_source_fd { int fd; uint32_t mask; void *data; + + struct poller *poller; + bool killed; }; /** @@ -64,7 +69,7 @@ struct event_source_signal_impl { }; /* - * The signal poller base class. This must be created by poller_add_signal. + * The signal poller class. This must be created by poller_add_signal. */ struct event_source_signal { const struct event_source_signal_impl *impl; @@ -72,6 +77,10 @@ struct event_source_signal { int signal; void *data; + + struct poller *poller; + bool raised; + bool killed; }; /** @@ -98,7 +107,15 @@ struct poll_impl { * The poller base class. This must be created by poller_create. */ struct poller { - const struct poll_impl *impl; + struct list signals; + struct list new_signals; + struct list fds; + struct list new_fds; + + struct pollfd *pollfds; + size_t pollfds_len; + bool dirty; + bool inpoll; }; /** |