1 use crate::fd::OwnedFd; 2 use crate::{backend, io}; 3 4 pub use backend::event::types::EventfdFlags; 5 6 /// `eventfd(initval, flags)`—Creates a file descriptor for event 7 /// notification. 8 /// 9 /// # References 10 /// - [Linux] 11 /// - [FreeBSD] 12 /// - [illumos] 13 /// 14 /// [Linux]: https://man7.org/linux/man-pages/man2/eventfd.2.html 15 /// [FreeBSD]: https://man.freebsd.org/cgi/man.cgi?eventfd 16 /// [illumos]: https://illumos.org/man/3C/eventfd 17 #[inline] eventfd(initval: u32, flags: EventfdFlags) -> io::Result<OwnedFd>18pub fn eventfd(initval: u32, flags: EventfdFlags) -> io::Result<OwnedFd> { 19 backend::event::syscalls::eventfd(initval, flags) 20 } 21