syscall: data and flag module updates
This commit is contained in:
+32
@@ -224,6 +224,38 @@ pub struct TimeSpec {
|
||||
pub tv_nsec: i32,
|
||||
}
|
||||
|
||||
#[derive(Copy, Clone, Debug, Default)]
|
||||
#[repr(C)]
|
||||
pub struct FutexWaitv {
|
||||
pub uaddr: usize,
|
||||
pub val: usize,
|
||||
pub flags: u32,
|
||||
pub __reserved: u32,
|
||||
}
|
||||
|
||||
impl Deref for FutexWaitv {
|
||||
type Target = [u8];
|
||||
fn deref(&self) -> &[u8] {
|
||||
unsafe {
|
||||
slice::from_raw_parts(
|
||||
self as *const FutexWaitv as *const u8,
|
||||
mem::size_of::<FutexWaitv>(),
|
||||
)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
impl DerefMut for FutexWaitv {
|
||||
fn deref_mut(&mut self) -> &mut [u8] {
|
||||
unsafe {
|
||||
slice::from_raw_parts_mut(
|
||||
self as *mut FutexWaitv as *mut u8,
|
||||
mem::size_of::<FutexWaitv>(),
|
||||
)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
const NANOS_PER_SEC: u128 = 1_000_000_000;
|
||||
|
||||
impl TimeSpec {
|
||||
|
||||
@@ -63,6 +63,8 @@ pub const FUTEX_WAIT: usize = 0;
|
||||
pub const FUTEX_WAKE: usize = 1;
|
||||
pub const FUTEX_REQUEUE: usize = 2;
|
||||
pub const FUTEX_WAIT64: usize = 3;
|
||||
/// Wait on multiple futexes atomically and return the index of the first one woken.
|
||||
pub const FUTEX_WAIT_MULTIPLE: usize = 4;
|
||||
|
||||
// TODO: Split SendFdFlags into caller flags and flags that the scheme receives?
|
||||
bitflags::bitflags! {
|
||||
|
||||
Reference in New Issue
Block a user