[GSoC 2017] Porting Swift to Haiku - Week #9 / #10 | Haiku Project

Time for another update on the swift port, which covers the last two weeks of my activity, So here it goes!


This is a companion discussion topic for the original entry at https://www.haiku-os.org/blog/return0e/2017-08-18_gsoc_2017_porting_swift_to_haiku_-_week_9__10/

When will a Haiku package be available for this?

Probably at the end of the GSoC period (early September?) but even when that time comes, someone with access to the HaikuPorts packages repository has to upload it.

Out of curiosity, what mechanisms does Haiku implement that serve the purpose of kqueue, or at least epoll? Does it just have select(), or similar?

The most generic way is wait_for_objects[_etc], which allows to wait on file descriptors, semaphores, ports, and thread events in a single call. However, it has an issue similar to select: the list of objects to wait on is managed on userland side, so it needs to be sent to the kernel each time the function is called.

This is the problem that epoll and kqueue solve, and we should likely implement one of these or a similar thing (making sure it can do as much as wait_for_objects in terms of events and object types supported).

I think hamishm started investigating this some time ago, but I don’t know how far he got with it.

1 Like