summaryrefslogtreecommitdiffstats
path: root/vendor/rustix/src/backend/libc/event/types.rs
diff options
context:
space:
mode:
Diffstat (limited to 'vendor/rustix/src/backend/libc/event/types.rs')
-rw-r--r--vendor/rustix/src/backend/libc/event/types.rs19
1 files changed, 19 insertions, 0 deletions
diff --git a/vendor/rustix/src/backend/libc/event/types.rs b/vendor/rustix/src/backend/libc/event/types.rs
new file mode 100644
index 000000000..632b1be63
--- /dev/null
+++ b/vendor/rustix/src/backend/libc/event/types.rs
@@ -0,0 +1,19 @@
+#[cfg(any(linux_kernel, target_os = "freebsd", target_os = "illumos"))]
+use {crate::backend::c, bitflags::bitflags};
+
+#[cfg(any(linux_kernel, target_os = "freebsd", target_os = "illumos"))]
+bitflags! {
+ /// `EFD_*` flags for use with [`eventfd`].
+ ///
+ /// [`eventfd`]: crate::io::eventfd
+ #[repr(transparent)]
+ #[derive(Copy, Clone, Eq, PartialEq, Hash, Debug)]
+ pub struct EventfdFlags: u32 {
+ /// `EFD_CLOEXEC`
+ const CLOEXEC = bitcast!(c::EFD_CLOEXEC);
+ /// `EFD_NONBLOCK`
+ const NONBLOCK = bitcast!(c::EFD_NONBLOCK);
+ /// `EFD_SEMAPHORE`
+ const SEMAPHORE = bitcast!(c::EFD_SEMAPHORE);
+ }
+}