aboutsummaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorKenny Levinsen <kl@kl.wtf>2020-08-03 01:21:51 +0200
committerKenny Levinsen <kl@kl.wtf>2020-08-03 02:13:22 +0200
commitd68c5feaee9b294d071c0825f5600e316c728708 (patch)
tree2b87b3f722997112943d89d647291d0ffbe04a96 /include
parent3f3bdd41dd774b65a6ee0ad63bf28a6e22e8908d (diff)
poller: Inline the poller into the server struct
Diffstat (limited to 'include')
-rw-r--r--include/poller.h12
-rw-r--r--include/server.h2
2 files changed, 9 insertions, 5 deletions
diff --git a/include/poller.h b/include/poller.h
index b203181..6b727c4 100644
--- a/include/poller.h
+++ b/include/poller.h
@@ -122,13 +122,17 @@ struct poller {
* Creates a poller with the best available polling backend. This poller must
* be torn down with poller_destroy when it is no longer needed.
*/
-struct poller *poller_create(void);
+/**
+ * Initializes the poller. The poller must be torn down with poller_finish when
+ * it is no longer needed.
+ */
+void poller_init(struct poller *poller);
/**
- * Destroys the poller. This destroys all remaining event sources, tears down
- * the poller and frees the structure.
+ * De-initializes the poller. This destroys all remaining event sources and
+ * tears down the poller.
*/
-int poller_destroy(struct poller *poller);
+int poller_finish(struct poller *poller);
/**
* Create an fd event source with the provided initial parameters. This event
diff --git a/include/server.h b/include/server.h
index 11de2c5..03bd9ca 100644
--- a/include/server.h
+++ b/include/server.h
@@ -10,7 +10,7 @@ struct client;
struct server {
bool running;
- struct poller *poller;
+ struct poller poller;
struct list seats;
};