| 991 | /// [`prctl(PR_SET_SYSCALL_USER_DISPATCH,PR_SYS_DISPATCH_ON,…)`]: https://man7.org/linux/man-pages/man2/prctl.2.html |
| 992 | #[inline] |
| 993 | pub 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 |