Opened 4 years ago

Last modified 11 months ago

#16846 closed enhancement

The future of fd stateful monitoring / eventing in Haiku — at Version 1

Reported by: kallisti5 Owned by: nobody
Priority: normal Milestone: R1/beta5
Component: Kits/Kernel Kit Version: R1/Development
Keywords: Cc:
Blocked By: Blocking:
Platform: All

Description (last modified by kallisti5)

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.

Pulkomandy pointed out a great overview here:

https://fosdem.org/2021/schedule/event/file_descriptor_monitoring/

And some previous work around event polling here:

https://github.com/hamishm/haiku/tree/eventqueue

A good model would likely be:

  1. Implement a fairly standard/complete io_uring (fd and sockets)
  2. Add epoll/kqueue compatibility functions which silently leverage io_uring
  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)

Change History (1)

comment:1 by kallisti5, 4 years ago

Description: modified (diff)
Summary: Better document wait_for_objects API calls, or reimplement?The future of fd stateful monitoring / eventing in Haiku
Note: See TracTickets for help on using tickets.