sched: re-export the wasi types used for times and events
This commit is contained in:
@@ -29,8 +29,8 @@ pub mod fs;
|
|||||||
mod handle;
|
mod handle;
|
||||||
pub mod old;
|
pub mod old;
|
||||||
mod path;
|
mod path;
|
||||||
mod poll;
|
|
||||||
mod sandboxed_tty_writer;
|
mod sandboxed_tty_writer;
|
||||||
|
pub(crate) mod sched;
|
||||||
pub mod snapshots;
|
pub mod snapshots;
|
||||||
mod string_array;
|
mod string_array;
|
||||||
mod sys;
|
mod sys;
|
||||||
|
|||||||
@@ -1,17 +0,0 @@
|
|||||||
use crate::entry::EntryHandle;
|
|
||||||
use crate::wasi::types;
|
|
||||||
|
|
||||||
pub(crate) use crate::sys::poll::*;
|
|
||||||
|
|
||||||
#[derive(Debug, Copy, Clone)]
|
|
||||||
pub(crate) struct ClockEventData {
|
|
||||||
pub(crate) delay: u128, // delay is expressed in nanoseconds
|
|
||||||
pub(crate) userdata: types::Userdata,
|
|
||||||
}
|
|
||||||
|
|
||||||
#[derive(Debug)]
|
|
||||||
pub(crate) struct FdEventData {
|
|
||||||
pub(crate) handle: EntryHandle,
|
|
||||||
pub(crate) r#type: types::Eventtype,
|
|
||||||
pub(crate) userdata: types::Userdata,
|
|
||||||
}
|
|
||||||
17
crates/wasi-common/src/sched.rs
Normal file
17
crates/wasi-common/src/sched.rs
Normal file
@@ -0,0 +1,17 @@
|
|||||||
|
use crate::entry::EntryHandle;
|
||||||
|
pub use crate::wasi::types::{
|
||||||
|
Clockid, Errno, Event, EventFdReadwrite, Eventrwflags, Eventtype, Subclockflags,
|
||||||
|
SubscriptionClock, Timestamp, Userdata,
|
||||||
|
};
|
||||||
|
#[derive(Debug, Copy, Clone)]
|
||||||
|
pub struct ClockEventData {
|
||||||
|
pub delay: u128, // delay is expressed in nanoseconds
|
||||||
|
pub userdata: Userdata,
|
||||||
|
}
|
||||||
|
|
||||||
|
#[derive(Debug)]
|
||||||
|
pub struct FdEventData {
|
||||||
|
pub handle: EntryHandle,
|
||||||
|
pub r#type: Eventtype,
|
||||||
|
pub userdata: Userdata,
|
||||||
|
}
|
||||||
Reference in New Issue
Block a user