Add itimer-related syscalls

This commit is contained in:
Chen Chengjun
2024-05-31 18:24:01 +08:00
committed by Tate, Hongliang Tian
parent 13fd173b24
commit c5ec2e181e
7 changed files with 432 additions and 2 deletions

View File

@ -95,3 +95,19 @@ impl From<UnixTime> for Duration {
Duration::from_secs(time.sec as _)
}
}
/// This struct is corresponding to the `itimerval` struct in Linux.
#[repr(C)]
#[derive(Debug, Default, Copy, Clone, Pod)]
pub struct itimerval_t {
pub it_interval: timeval_t,
pub it_value: timeval_t,
}
/// This struct is corresponding to the `itimerspec` struct in Linux.
#[repr(C)]
#[derive(Debug, Default, Copy, Clone, Pod)]
pub struct itimerspec_t {
pub it_interval: timespec_t,
pub it_value: timespec_t,
}