diff options
Diffstat (limited to 'vendor/rustix/src/backend/linux_raw/thread/syscalls.rs')
-rw-r--r-- | vendor/rustix/src/backend/linux_raw/thread/syscalls.rs | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/vendor/rustix/src/backend/linux_raw/thread/syscalls.rs b/vendor/rustix/src/backend/linux_raw/thread/syscalls.rs index 99c632e7e..2ec3e43e8 100644 --- a/vendor/rustix/src/backend/linux_raw/thread/syscalls.rs +++ b/vendor/rustix/src/backend/linux_raw/thread/syscalls.rs @@ -288,3 +288,9 @@ unsafe fn futex_old( pub(crate) fn setns(fd: BorrowedFd, nstype: c::c_int) -> io::Result<c::c_int> { unsafe { ret_c_int(syscall_readonly!(__NR_setns, fd, c_int(nstype))) } } + +#[cfg(any(target_os = "android", target_os = "linux"))] +#[inline] +pub(crate) fn unshare(flags: crate::thread::UnshareFlags) -> io::Result<()> { + unsafe { ret(syscall_readonly!(__NR_unshare, c_uint(flags.bits()))) } +} |