summaryrefslogtreecommitdiffstats
path: root/vendor/rustix-0.36.5/src/io/eventfd.rs
diff options
context:
space:
mode:
Diffstat (limited to 'vendor/rustix-0.36.5/src/io/eventfd.rs')
-rw-r--r--vendor/rustix-0.36.5/src/io/eventfd.rs16
1 files changed, 16 insertions, 0 deletions
diff --git a/vendor/rustix-0.36.5/src/io/eventfd.rs b/vendor/rustix-0.36.5/src/io/eventfd.rs
new file mode 100644
index 000000000..22ffc627c
--- /dev/null
+++ b/vendor/rustix-0.36.5/src/io/eventfd.rs
@@ -0,0 +1,16 @@
+use crate::fd::OwnedFd;
+use crate::{backend, io};
+
+pub use backend::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> {
+ backend::io::syscalls::eventfd(initval, flags)
+}