2 ms·
Of course Linux has had semaphores for a long time. (As has Windows.) I know my way around the Linux kernel pretty well and on the Windows side, I am ex-msft. S
by asveikau 10y ago
Of course Linux has had semaphores for a long time. (As has Windows.) I know my way around the Linux kernel pretty well and on the Windows side, I am ex-msft. So I am not learning anything from your scholarly summary here.
I mean that eventfd(2) is somewhat more recent and reminds me more of Win32 than the POSIX APIs for this. The API exposes an fd (read: HANDLE) which you can block on with the select/poll/epoll syscalls (read: WaitForMultipleObjects). The comparison could not be more direct. Whereas Unixy APIs and internal-to-linux APIs do not historically reason about synchronization primitives in terms of files.
(PS. Manpage for eventfd(2) says you can open it in a semaphore mode.)