aboutsummaryrefslogtreecommitdiff
path: root/vendor/rustix/src/backend/libc/shm/syscalls.rs
diff options
context:
space:
mode:
authorValentin Popov <valentin@popov.link>2024-07-19 15:37:58 +0300
committerValentin Popov <valentin@popov.link>2024-07-19 15:37:58 +0300
commita990de90fe41456a23e58bd087d2f107d321f3a1 (patch)
tree15afc392522a9e85dc3332235e311b7d39352ea9 /vendor/rustix/src/backend/libc/shm/syscalls.rs
parent3d48cd3f81164bbfc1a755dc1d4a9a02f98c8ddd (diff)
downloadfparkan-a990de90fe41456a23e58bd087d2f107d321f3a1.tar.xz
fparkan-a990de90fe41456a23e58bd087d2f107d321f3a1.zip
Deleted vendor folder
Diffstat (limited to 'vendor/rustix/src/backend/libc/shm/syscalls.rs')
-rw-r--r--vendor/rustix/src/backend/libc/shm/syscalls.rs25
1 files changed, 0 insertions, 25 deletions
diff --git a/vendor/rustix/src/backend/libc/shm/syscalls.rs b/vendor/rustix/src/backend/libc/shm/syscalls.rs
deleted file mode 100644
index b0d907f..0000000
--- a/vendor/rustix/src/backend/libc/shm/syscalls.rs
+++ /dev/null
@@ -1,25 +0,0 @@
-use crate::ffi::CStr;
-
-use crate::backend::c;
-use crate::backend::conv::{c_str, ret, ret_owned_fd};
-use crate::fd::OwnedFd;
-use crate::fs::Mode;
-use crate::io;
-use crate::shm::ShmOFlags;
-
-pub(crate) fn shm_open(name: &CStr, oflags: ShmOFlags, mode: Mode) -> io::Result<OwnedFd> {
- // On this platforms, `mode_t` is `u16` and can't be passed directly to a
- // variadic function.
- #[cfg(apple)]
- let mode: c::c_uint = mode.bits().into();
-
- // Otherwise, cast to `mode_t` as that's what `open` is documented to take.
- #[cfg(not(apple))]
- let mode: c::mode_t = mode.bits() as _;
-
- unsafe { ret_owned_fd(c::shm_open(c_str(name), bitflags_bits!(oflags), mode)) }
-}
-
-pub(crate) fn shm_unlink(name: &CStr) -> io::Result<()> {
- unsafe { ret(c::shm_unlink(c_str(name))) }
-}