From 95fd9a4ae2717a73bc446b29a87ad5bc9f00317e Mon Sep 17 00:00:00 2001 From: Dirk Engling Date: Fri, 30 Oct 2026 02:35:32 +0100 Subject: Reduce number of per connection sys calls --- ot_event.h | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'ot_event.h') diff --git a/ot_event.h b/ot_event.h index 6023134..aa007d0 100644 --- a/ot_event.h +++ b/ot_event.h @@ -29,6 +29,11 @@ int event_add(int fd, int what, uint32_t generation); int event_modify(int fd, int what, uint32_t generation); int event_del(int fd); +/* Stop watching a descriptor and close it. Where the kernel drops a closed + descriptor from its set by itself, this is one system call where doing the + two separately would be two. */ +int event_close(int fd); + /* Waits at most timeout_ms, or indefinitely when that is negative, and fills out with up to max ready descriptors. Returns how many, or -1. */ int event_wait(ot_event *out, int max, int timeout_ms); -- cgit v1.3