1 | //! linux_raw syscalls supporting modules that use `prctl`. |
2 | //! |
3 | //! # Safety |
4 | //! |
5 | //! See the `rustix::backend` module documentation for details. |
6 | #![allow (unsafe_code, clippy::undocumented_unsafe_blocks)] |
7 | |
8 | use crate::backend::c; |
9 | use crate::backend::conv::{c_int, ret_c_int}; |
10 | use crate::io; |
11 | |
12 | #[inline ] |
13 | pub(crate) unsafe fn prctl( |
14 | option: c::c_int, |
15 | arg2: *mut c::c_void, |
16 | arg3: *mut c::c_void, |
17 | arg4: *mut c::c_void, |
18 | arg5: *mut c::c_void, |
19 | ) -> io::Result<c::c_int> { |
20 | ret_c_int(raw:syscall!(__NR_prctl, c_int(option), arg2, arg3, arg4, arg5)) |
21 | } |
22 | |