path: root/sys/bsm
diff options
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/bsm
parent7cb901bf227f1591f208a9df5ddc948c6124e0a8 (diff)
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/bsm')
1 files changed, 1 insertions, 0 deletions
diff --git a/sys/bsm/audit_kevents.h b/sys/bsm/audit_kevents.h
index 150ecc1b49ac..5b37329078a1 100644
--- a/sys/bsm/audit_kevents.h
+++ b/sys/bsm/audit_kevents.h
@@ -659,6 +659,7 @@
#define AUE_SHMRENAME 43263 /* FreeBSD-specific. */
#define AUE_REALPATHAT 43264 /* FreeBSD-specific. */
#define AUE_CLOSERANGE 43265 /* FreeBSD-specific. */
+#define AUE_SPECIALFD 43266 /* FreeBSD-specific. */
* Darwin BSM uses a number of AUE_O_* definitions, which are aliased to the