summaryrefslogtreecommitdiff
path: root/ot_event.c
diff options
context:
space:
mode:
authorDirk Engling <erdgeist@erdgeist.org>2026-10-31 00:30:09 +0100
committerDirk Engling <erdgeist@erdgeist.org>2026-10-31 00:30:09 +0100
commite9445a41e5cbb4f1a1091302efdf3e80d0d70c7f (patch)
treef2229d101a618f5d6747aa339f0d32bdc0191479 /ot_event.c
parent15f9f81b5a8398fefca023e90d8d1c168ecef620 (diff)
Add config parsers for multiple tcp socket readers and a helper to see if we can offer it on the platform
Diffstat (limited to 'ot_event.c')
-rw-r--r--ot_event.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/ot_event.c b/ot_event.c
index b4c4a55..61cc07b 100644
--- a/ot_event.c
+++ b/ot_event.c
@@ -40,6 +40,9 @@ static struct epoll_event *g_ready;
40static int g_ready_space; 40static int g_ready_space;
41 41
42const char *event_mechanism(void) { return "epoll"; } 42const char *event_mechanism(void) { return "epoll"; }
43/* The set lives in the kernel, and epoll_ctl during another thread's
44 epoll_wait is what it is for */
45int event_can_share(void) { return 1; }
43 46
44int event_init(void) { 47int event_init(void) {
45 g_ready = NULL; 48 g_ready = NULL;
@@ -118,6 +121,8 @@ static struct kevent *g_ready;
118static int g_ready_space; 121static int g_ready_space;
119 122
120const char *event_mechanism(void) { return "kqueue"; } 123const char *event_mechanism(void) { return "kqueue"; }
124/* The set lives in the kernel, and kevent may be called from any thread */
125int event_can_share(void) { return 1; }
121 126
122int event_init(void) { 127int event_init(void) {
123 g_ready = NULL; 128 g_ready = NULL;
@@ -229,6 +234,8 @@ static int *g_where;
229static int g_count, g_space, g_where_space; 234static int g_count, g_space, g_where_space;
230 235
231const char *event_mechanism(void) { return "poll"; } 236const char *event_mechanism(void) { return "poll"; }
237/* The arrays below are ours and nothing guards them */
238int event_can_share(void) { return 0; }
232 239
233int event_init(void) { 240int event_init(void) {
234 g_pfds = NULL, g_generation = NULL, g_where = NULL; 241 g_pfds = NULL, g_generation = NULL, g_where = NULL;