0.1.48 - add itimerspec
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
[package]
|
||||
name = "redox_syscall"
|
||||
version = "0.1.47"
|
||||
version = "0.1.48"
|
||||
description = "A Rust library to access raw Redox system calls"
|
||||
license = "MIT"
|
||||
authors = ["Jeremy Soller <jackpot51@gmail.com>"]
|
||||
|
||||
26
src/data.rs
26
src/data.rs
@@ -26,6 +26,32 @@ impl DerefMut for Event {
|
||||
}
|
||||
}
|
||||
|
||||
#[derive(Copy, Clone, Debug, Default)]
|
||||
#[repr(C)]
|
||||
pub struct ITimerSpec {
|
||||
it_interval: TimeSpec,
|
||||
it_value: TimeSpec,
|
||||
}
|
||||
|
||||
impl Deref for ITimerSpec {
|
||||
type Target = [u8];
|
||||
fn deref(&self) -> &[u8] {
|
||||
unsafe {
|
||||
slice::from_raw_parts(self as *const ITimerSpec as *const u8,
|
||||
mem::size_of::<ITimerSpec>()) as &[u8]
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
impl DerefMut for ITimerSpec {
|
||||
fn deref_mut(&mut self) -> &mut [u8] {
|
||||
unsafe {
|
||||
slice::from_raw_parts_mut(self as *mut ITimerSpec as *mut u8,
|
||||
mem::size_of::<ITimerSpec>()) as &mut [u8]
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
#[derive(Copy, Clone, Debug, Default)]
|
||||
#[repr(C)]
|
||||
pub struct Map {
|
||||
|
||||
Reference in New Issue
Block a user