MCPcopy Create free account
hub / github.com/bytecodealliance/rustix / enable_syscall_user_dispatch

Function enable_syscall_user_dispatch

src/thread/prctl.rs:993–1005  ·  view source on GitHub ↗
(
    always_allowed_region: &[u8],
    fast_switch_flag: &AtomicU8,
)

Source from the content-addressed store, hash-verified

991/// [`prctl(PR_SET_SYSCALL_USER_DISPATCH,PR_SYS_DISPATCH_ON,…)`]: https://man7.org/linux/man-pages/man2/prctl.2.html
992#[inline]
993pub unsafe fn enable_syscall_user_dispatch(
994 always_allowed_region: &[u8],
995 fast_switch_flag: &AtomicU8,
996) -> io::Result<()> {
997 syscalls::prctl(
998 PR_SET_SYSCALL_USER_DISPATCH,
999 PR_SYS_DISPATCH_ON as *mut _,
1000 always_allowed_region.as_ptr() as *mut _,
1001 always_allowed_region.len() as *mut _,
1002 as_ptr(fast_switch_flag) as *mut _,
1003 )
1004 .map(|_r| ())
1005}
1006
1007//
1008// PR_SCHED_CORE

Callers

nothing calls this directly

Calls 4

as_ptrFunction · 0.85
prctlFunction · 0.50
as_ptrMethod · 0.45
lenMethod · 0.45

Tested by

no test coverage detected