Changes between Initial Version and Version 1 of Ticket #16846
- Timestamp:
- Mar 11, 2021, 9:18:39 PM (4 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
Ticket #16846
- Property Summary Better document wait_for_objects API calls, or reimplement? → The future of fd stateful monitoring / eventing in Haiku
-
Ticket #16846 – Description
initial v1 1 T he "wait_for_objects" API calls in https://github.com/haiku/haiku/blob/master/headers/os/kernel/OS.h#L634 seem to be a potential stand-in for epoll and kqueue (which the Rust tokio-rs mio developers are asking about)1 Today Haiku offers a "wait_for_objects" API which is as close as we get to epoll / kqueue which exists on OS X / FreeBSD / Linux. 2 2 3 epoll / kqueue exist on OS X / FreeBSD / Linux (however are not part of the posix standard) 3 Pulkomandy pointed out a great overview here: 4 https://fosdem.org/2021/schedule/event/file_descriptor_monitoring/ 5 6 And some previous work around event polling here: 7 https://github.com/hamishm/haiku/tree/eventqueue 4 8 5 9 6 We should: 7 1. Better document wait_for_objects with some hints about it being a epoll/kqueue alternative 8 2. Refactor the API and make it more friendly for ports inline with epoll / kqueue? 10 A good model would likely be: 11 1. Implement a fairly standard/complete io_uring (fd and sockets) 12 2. Add epoll/kqueue compatibility functions which silently leverage io_uring 13 3. Drop wait_for_objects or make it official. (only consumer seems to be power daemon https://git.haiku-os.org/haiku/tree/src/servers/power/power_daemon.cpp#n118)