pub struct Thread { /* private fields */ }
Expand description
A single Zephyr thread.
This wraps a k_thread
type within Rust. This value is returned from
StaticThread::init_once
and represents an initialized thread that hasn’t been started.
Implementations§
source§impl Thread
impl Thread
sourcepub fn set_priority(&mut self, priority: c_int)
pub fn set_priority(&mut self, priority: c_int)
Set the priority the thread will be created at.
sourcepub fn set_options(&mut self, options: u32)
pub fn set_options(&mut self, options: u32)
Set the value of the options passed to thread creation.
sourcepub fn set_name(&mut self, name: &'static CStr)
pub fn set_name(&mut self, name: &'static CStr)
Set a name for this thread.
Attempts to set the name of this thread, if Zephyr if configured to do so. Has no effect otherwise.
sourcepub unsafe fn simple_spawn(
self,
child: k_thread_entry_t,
p1: *mut c_void,
p2: *mut c_void,
p3: *mut c_void,
)
pub unsafe fn simple_spawn( self, child: k_thread_entry_t, p1: *mut c_void, p2: *mut c_void, p3: *mut c_void, )
Simple thread spawn. This is unsafe because of the raw values being used. This can be useful in systems without an allocator defined.
Auto Trait Implementations§
impl Freeze for Thread
impl RefUnwindSafe for Thread
impl !Send for Thread
impl !Sync for Thread
impl Unpin for Thread
impl UnwindSafe for Thread
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more