Skip to content

Commit edd1b61

Browse files
youknowonetgross35
authored andcommitted
getitimer and setitimer for linux
1 parent fb18f26 commit edd1b61

1 file changed

Lines changed: 11 additions & 0 deletions

File tree

src/unix/linux_like/mod.rs

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1930,6 +1930,17 @@ extern "C" {
19301930
#[cfg(not(target_os = "l4re"))]
19311931
pub fn clock_getcpuclockid(pid: crate::pid_t, clk_id: *mut crate::clockid_t) -> c_int;
19321932

1933+
#[cfg_attr(gnu_time_bits64, link_name = "__getitimer64")]
1934+
#[cfg_attr(musl32_time64, link_name = "__getitimer_time64")]
1935+
pub fn getitimer(which: c_int, curr_value: *mut crate::itimerval) -> c_int;
1936+
#[cfg_attr(gnu_time_bits64, link_name = "__setitimer64")]
1937+
#[cfg_attr(musl32_time64, link_name = "__setitimer_time64")]
1938+
pub fn setitimer(
1939+
which: c_int,
1940+
new_value: *const crate::itimerval,
1941+
old_value: *mut crate::itimerval,
1942+
) -> c_int;
1943+
19331944
pub fn dirfd(dirp: *mut crate::DIR) -> c_int;
19341945

19351946
pub fn memalign(align: size_t, size: size_t) -> *mut c_void;

0 commit comments

Comments
 (0)