From e9445a41e5cbb4f1a1091302efdf3e80d0d70c7f Mon Sep 17 00:00:00 2001 From: Dirk Engling Date: Sat, 31 Oct 2026 00:30:09 +0100 Subject: Add config parsers for multiple tcp socket readers and a helper to see if we can offer it on the platform --- ot_event.c | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'ot_event.c') 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; static int g_ready_space; const char *event_mechanism(void) { return "epoll"; } +/* The set lives in the kernel, and epoll_ctl during another thread's + epoll_wait is what it is for */ +int event_can_share(void) { return 1; } int event_init(void) { g_ready = NULL; @@ -118,6 +121,8 @@ static struct kevent *g_ready; static int g_ready_space; const char *event_mechanism(void) { return "kqueue"; } +/* The set lives in the kernel, and kevent may be called from any thread */ +int event_can_share(void) { return 1; } int event_init(void) { g_ready = NULL; @@ -229,6 +234,8 @@ static int *g_where; static int g_count, g_space, g_where_space; const char *event_mechanism(void) { return "poll"; } +/* The arrays below are ours and nothing guards them */ +int event_can_share(void) { return 0; } int event_init(void) { g_pfds = NULL, g_generation = NULL, g_where = NULL; -- cgit v1.3