summaryrefslogtreecommitdiffstats
path: root/vendor/rustix/src/io/eventfd.rs
diff options
context:
space:
mode:
Diffstat (limited to 'vendor/rustix/src/io/eventfd.rs')
-rw-r--r--vendor/rustix/src/io/eventfd.rs16
1 files changed, 16 insertions, 0 deletions
diff --git a/vendor/rustix/src/io/eventfd.rs b/vendor/rustix/src/io/eventfd.rs
new file mode 100644
index 000000000..53e9d11f0
--- /dev/null
+++ b/vendor/rustix/src/io/eventfd.rs
@@ -0,0 +1,16 @@
+use crate::imp;
+use crate::io::{self, OwnedFd};
+
+pub use imp::io::types::EventfdFlags;
+
+/// `eventfd(initval, flags)`—Creates a file descriptor for event
+/// notification.
+///
+/// # References
+/// - [Linux]
+///
+/// [Linux]: https://man7.org/linux/man-pages/man2/eventfd.2.html
+#[inline]
+pub fn eventfd(initval: u32, flags: EventfdFlags) -> io::Result<OwnedFd> {
+ imp::io::syscalls::eventfd(initval, flags)
+}