diff options
Diffstat (limited to 'vendor/rustix/src/backend/libc/thread')
-rw-r--r-- | vendor/rustix/src/backend/libc/thread/syscalls.rs | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/vendor/rustix/src/backend/libc/thread/syscalls.rs b/vendor/rustix/src/backend/libc/thread/syscalls.rs index 0709fbb19..4f69b8f63 100644 --- a/vendor/rustix/src/backend/libc/thread/syscalls.rs +++ b/vendor/rustix/src/backend/libc/thread/syscalls.rs @@ -293,3 +293,9 @@ pub(crate) fn gettid() -> Pid { pub(crate) fn setns(fd: BorrowedFd, nstype: c::c_int) -> io::Result<c::c_int> { unsafe { ret_c_int(c::setns(borrowed_fd(fd), nstype)) } } + +#[cfg(any(target_os = "android", target_os = "linux"))] +#[inline] +pub(crate) fn unshare(flags: crate::thread::UnshareFlags) -> io::Result<()> { + unsafe { ret(c::unshare(flags.bits() as i32)) } +} |