From d68c5feaee9b294d071c0825f5600e316c728708 Mon Sep 17 00:00:00 2001 From: Kenny Levinsen Date: Mon, 3 Aug 2020 01:21:51 +0200 Subject: poller: Inline the poller into the server struct --- include/poller.h | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) (limited to 'include/poller.h') 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 -- cgit v1.2.3