tech-kern archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
Native timerfd and eventfd
[Cross-posted to tech-userlevel because this is primarily about an API exposed to user-space.]
This past winter, I wrote NetBSD native implementations of the Linux timerfd[1] and eventfd[2] APIs, mainly to fill out gaps in COMPAT_LINUX. Of course, I wanted to write ATF unit tests for them, so I needed them to be native syscalls, too.
The code to implement these is quite small, and the APIs are not unreasonable (eventfd is certainly less cumbersome to use for its intended purpose than a pair of pipes, and timerfd is a much better interface than EVFILT_TIMER and essentially serves as a descriptor-oriented interface to the regular POSIX timer support). Because of this, I think they should be included as native syscalls.
If the consensus is that these are reasonable things to add as native syscalls, I’ll whip up man pages for them and do that. Otherwise, I’ll just relegate them to COMPAT_LINUX and toss the ATF unit tests (I see no mechanism to run ATF unit tests against COMPAT_* syscalls, and I’m not particularly inclined to invent one).
[1] https://man7.org/linux/man-pages/man2/timerfd_create.2.html
[2] https://man7.org/linux/man-pages/man2/eventfd.2.html
-- thorpej
Home |
Main Index |
Thread Index |
Old Index