summaryrefslogtreecommitdiffstats
path: root/vendor/rustix/src/backend/linux_raw/shm/types.rs
diff options
context:
space:
mode:
Diffstat (limited to 'vendor/rustix/src/backend/linux_raw/shm/types.rs')
-rw-r--r--vendor/rustix/src/backend/linux_raw/shm/types.rs30
1 files changed, 30 insertions, 0 deletions
diff --git a/vendor/rustix/src/backend/linux_raw/shm/types.rs b/vendor/rustix/src/backend/linux_raw/shm/types.rs
new file mode 100644
index 000000000..3343d4424
--- /dev/null
+++ b/vendor/rustix/src/backend/linux_raw/shm/types.rs
@@ -0,0 +1,30 @@
+use crate::backend::c;
+use bitflags::bitflags;
+
+bitflags! {
+ /// `O_*` constants for use with [`shm_open`].
+ ///
+ /// [`shm_open`]: crate:shm::shm_open
+ #[repr(transparent)]
+ #[derive(Copy, Clone, Eq, PartialEq, Hash, Debug)]
+ pub struct ShmOFlags: c::c_uint {
+ /// `O_CREAT`
+ #[doc(alias = "CREAT")]
+ const CREATE = linux_raw_sys::general::O_CREAT;
+
+ /// `O_EXCL`
+ const EXCL = linux_raw_sys::general::O_EXCL;
+
+ /// `O_RDONLY`
+ const RDONLY = linux_raw_sys::general::O_RDONLY;
+
+ /// `O_RDWR`
+ const RDWR = linux_raw_sys::general::O_RDWR;
+
+ /// `O_TRUNC`
+ const TRUNC = linux_raw_sys::general::O_TRUNC;
+
+ /// <https://docs.rs/bitflags/*/bitflags/#externally-defined-flags>
+ const _ = !0;
+ }
+}