61 lines
1.3 KiB
Rust
Raw Normal View History

2024-11-12 17:50:38 +02:00
use core::ffi::c_int;
use super::{sys_time::__ygg_timeval_t, sys_types::id_t};
pub type rlim_t = u64;
pub const PRIO_PROCESS: c_int = 0;
pub const PRIO_PGRP: c_int = 1;
pub const PRIO_USER: c_int = 2;
pub const RLIM_INFINITY: rlim_t = u64::MAX;
pub const RLIM_SAVED_MAX: rlim_t = RLIM_INFINITY;
pub const RLIM_SAVED_CUR: rlim_t = RLIM_INFINITY;
pub const RUSAGE_SELF: c_int = 0;
pub const RLIMIT_CORE: c_int = 1;
pub const RLIMIT_CPU: c_int = 2;
pub const RLIMIT_DATA: c_int = 3;
pub const RLIMIT_FSIZE: c_int = 4;
pub const RLIMIT_NOFILE: c_int = 5;
pub const RLIMIT_STACK: c_int = 6;
pub const RLIMIT_AS: c_int = 7;
#[repr(C)]
pub struct rlimit {
pub rlim_cur: rlim_t,
pub rlim_max: rlim_t
}
#[repr(C)]
pub struct rusage {
pub ru_utime: __ygg_timeval_t,
pub ru_stime: __ygg_timeval_t
}
#[no_mangle]
unsafe extern "C" fn getpriority(_which: c_int, _who: id_t) -> c_int {
todo!()
}
#[no_mangle]
unsafe extern "C" fn getrlimit(_which: c_int, _rlimit: *mut rlimit) -> c_int {
todo!()
}
#[no_mangle]
unsafe extern "C" fn getrusage(_which: c_int, _rusage: *mut rusage) -> c_int {
todo!()
}
#[no_mangle]
unsafe extern "C" fn setpriority(_which: c_int, _who: id_t, _prio: c_int) -> c_int {
todo!()
}
#[no_mangle]
unsafe extern "C" fn setrlimit(_which: c_int, _rlimit: *const rlimit) -> c_int {
todo!()
}