Isolate solaris event completion #20662
Closed
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
The event completion framework of Solaris is in some way the Solaris alternative to
kqueue
andepoll
[1]. It it is, however, specific to Solaris and afaik not implemented anywhere else in that way. Especially, it is not part of POSIX or some libc implementations that I am aware of.Move symbols related to the Solaris event completeion framework (
port_*
) tosolaris.zig
and remove fromposix.zig
and the generalc.zig
.Note that, in case of a Solaris build the respective symbols will be still available by means of
usingnamespace
inc.zig
. This seems sufficient given that any direct use of the event completion API will anyways only work on Solaris.Especially, in case of
port_t
putting this intoposix.zig
can be considered harmful. It is all to easy to mistake for POSIX'sin_port_t
[2,3], which issemantically wrong.
resolves #20563
[1] Solaris Event Completion: https://web.archive.org/web/20120819060517/http://developers.sun.com/solaris/articles/event_completion.html
[2] Not available in
posix.zig
currently. Might be another issue?[3] POSIX standard this is based on: https://pubs.opengroup.org/onlinepubs/9699919799/download/index.html