| ... | ... | @@ -1523,6 +1523,21 @@ pub fn timerfd_settime(fd: i32, flags: u32, new_value: *const itimerspec, old_va |
| 1523 | 1523 | return syscall4(.timerfd_settime, @bitCast(usize, @as(isize, fd)), flags, @ptrToInt(new_value), @ptrToInt(old_value)); |
| 1524 | 1524 | } |
| 1525 | 1525 | |
| 1526 | // Flags for the 'setitimer' system call |
| 1527 | pub const ITIMER = enum(i32) { |
| 1528 | REAL = 0, |
| 1529 | VIRTUAL = 1, |
| 1530 | PROF = 2, |
| 1531 | }; |
| 1532 | |
| 1533 | pub fn getitimer(which: i32, curr_value: *itimerspec) usize { |
| 1534 | return syscall2(.getitimer, @bitCast(usize, @as(isize, which)), @ptrToInt(curr_value)); |
| 1535 | } |
| 1536 | |
| 1537 | pub fn setitimer(which: i32, new_value: *const itimerspec, old_value: ?*itimerspec) usize { |
| 1538 | return syscall3(.setitimer, @bitCast(usize, @as(isize, which)), @ptrToInt(new_value), @ptrToInt(old_value)); |
| 1539 | } |
| 1540 | |
| 1526 | 1541 | pub fn unshare(flags: usize) usize { |
| 1527 | 1542 | return syscall1(.unshare, flags); |
| 1528 | 1543 | } |