aboutsummaryrefslogtreecommitdiff
path: root/sys/kern/syscalls.master
diff options
context:
space:
mode:
authorKonstantin Belousov <kib@FreeBSD.org>2020-12-23 14:14:04 +0000
committerKonstantin Belousov <kib@FreeBSD.org>2020-12-27 10:57:26 +0000
commit7a202823aa54ba18c485bdbcf355269bcfee1ab9 (patch)
treea6a53d2d79199defb8e4b96dae58c166f08788cf /sys/kern/syscalls.master
parent7cb901bf227f1591f208a9df5ddc948c6124e0a8 (diff)
downloadsrc-7a202823aa54ba18c485bdbcf355269bcfee1ab9.tar.gz
src-7a202823aa54ba18c485bdbcf355269bcfee1ab9.zip
Expose eventfd in the native API/ABI using a new __specialfd syscall
eventfd is a Linux system call that produces special file descriptors for event notification. When porting Linux software, it is currently usually emulated by epoll-shim on top of kqueues. Unfortunately, kqueues are not passable between processes. And, as noted by the author of epoll-shim, even if they were, the library state would also have to be passed somehow. This came up when debugging strange HW video decode failures in Firefox. A native implementation would avoid these problems and help with porting Linux software. Since we now already have an eventfd implementation in the kernel (for the Linuxulator), it's pretty easy to expose it natively, which is what this patch does. Submitted by: greg@unrelenting.technology Reviewed by: markj (previous version) MFC after: 2 weeks Differential Revision: https://reviews.freebsd.org/D26668
Diffstat (limited to 'sys/kern/syscalls.master')
-rw-r--r--sys/kern/syscalls.master7
1 files changed, 7 insertions, 0 deletions
diff --git a/sys/kern/syscalls.master b/sys/kern/syscalls.master
index 4a641aaf141f..b7ea5e939635 100644
--- a/sys/kern/syscalls.master
+++ b/sys/kern/syscalls.master
@@ -3241,6 +3241,13 @@
_In_z_ const char *path
);
}
+577 AUE_SPECIALFD STD {
+ int __specialfd(
+ int type,
+ _In_reads_bytes_(len) const void *req,
+ size_t len
+ );
+ }
; Please copy any additions and changes to the following compatability tables:
; sys/compat/freebsd32/syscalls.master