ThreadFn

Trait ThreadFn 

Source
pub trait ThreadFn {
    // Required methods
    fn spawn<F>(
        &mut self,
        param: Option<ThreadParam>,
        callback: F,
    ) -> Result<Self>
       where F: Fn(Box<dyn Thread>, Option<ThreadParam>) -> Result<ThreadParam> + Send + Sync + 'static,
             Self: Sized;
    fn spawn_simple<F>(&mut self, callback: F) -> Result<Self>
       where F: Fn() + Send + Sync + 'static,
             Self: Sized;
    fn delete(&self);
    fn suspend(&self);
    fn resume(&self);
    fn join(&self, retval: DoublePtr) -> Result<i32>;
    fn get_metadata(&self) -> ThreadMetadata;
    fn get_current() -> Self
       where Self: Sized;
    fn notify(&self, notification: ThreadNotification) -> Result<()>;
    fn notify_from_isr(
        &self,
        notification: ThreadNotification,
        higher_priority_task_woken: &mut BaseType,
    ) -> Result<()>;
    fn wait_notification(
        &self,
        bits_to_clear_on_entry: u32,
        bits_to_clear_on_exit: u32,
        timeout_ticks: TickType,
    ) -> Result<u32>;
}

Required Methods§

Source

fn spawn<F>(&mut self, param: Option<ThreadParam>, callback: F) -> Result<Self>
where F: Fn(Box<dyn Thread>, Option<ThreadParam>) -> Result<ThreadParam> + Send + Sync + 'static, Self: Sized,

Source

fn spawn_simple<F>(&mut self, callback: F) -> Result<Self>
where F: Fn() + Send + Sync + 'static, Self: Sized,

Source

fn delete(&self)

Source

fn suspend(&self)

Source

fn resume(&self)

Source

fn join(&self, retval: DoublePtr) -> Result<i32>

Source

fn get_metadata(&self) -> ThreadMetadata

Source

fn get_current() -> Self
where Self: Sized,

Source

fn notify(&self, notification: ThreadNotification) -> Result<()>

Source

fn notify_from_isr( &self, notification: ThreadNotification, higher_priority_task_woken: &mut BaseType, ) -> Result<()>

Source

fn wait_notification( &self, bits_to_clear_on_entry: u32, bits_to_clear_on_exit: u32, timeout_ticks: TickType, ) -> Result<u32>

Implementors§