]> git.proxmox.com Git - rustc.git/blame - vendor/rustix/src/backend/linux_raw/prctl/syscalls.rs
New upstream version 1.74.1+dfsg1
[rustc.git] / vendor / rustix / src / backend / linux_raw / prctl / syscalls.rs
CommitLineData
fe692bf9
FG
1//! linux_raw syscalls supporting modules that use `prctl`.
2//!
3//! # Safety
4//!
5//! See the `rustix::backend` module documentation for details.
781aab86 6#![allow(unsafe_code, clippy::undocumented_unsafe_blocks)]
fe692bf9
FG
7
8use crate::backend::c;
9use crate::backend::conv::{c_int, ret_c_int};
10use crate::io;
11
12#[inline]
13pub(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(syscall!(__NR_prctl, c_int(option), arg2, arg3, arg4, arg5))
21}