Re: Syscalls: eventfd and timerfd

From: Konstantin Belousov <>
Date: Tue, 10 Jan 2023 23:29:35 UTC
On Tue, Jan 10, 2023 at 05:21:42PM -0600, Jake Freeland wrote:
> Hi there,
> I am currently working on moving the linux_compat implementation of
> timerfd (in sys/compat/linux/linux_event.c) into its own FreeBSD syscall
> similar to what was done for eventfd. This is my first time implementing
> a syscall, so I have been following the eventfd implementation as a
> reference. I noticed that the eventfd syscall entries are absent from
> sys/kern/syscalls.master and I am not sure why. Was eventfd never
> formally added as a syscall entry or am I missing something? I was
> planning on adding timerfd entries to syscalls.master, but now I am
> unsure how to proceed.
There is no eventfd(2) in FreeBSD.  There is __specialfd(2) syscall #577,
which dispatches based on type.  The libc wrapper provides eventfd(3) API.