aboutsummaryrefslogtreecommitdiff
path: root/sys/kern/kern_descrip.c
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/kern_descrip.c
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/kern_descrip.c')
-rw-r--r--sys/kern/kern_descrip.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/sys/kern/kern_descrip.c b/sys/kern/kern_descrip.c
index 3c9664c69da6..a510ad90a618 100644
--- a/sys/kern/kern_descrip.c
+++ b/sys/kern/kern_descrip.c
@@ -4609,8 +4609,8 @@ file_type_to_name(short type)
return ("dev");
case DTYPE_PROCDESC:
return ("proc");
- case DTYPE_LINUXEFD:
- return ("levent");
+ case DTYPE_EVENTFD:
+ return ("eventfd");
case DTYPE_LINUXTFD:
return ("ltimer");
default: