#[repr(C)]pub struct Thread {Show 15 fields
pub self_ref: *mut Thread,
pub state: ThreadState,
pub owns_stack: bool,
pub pad: [u8; 2],
pub handle: Handle,
pub stack: *mut u8,
pub stack_size: usize,
pub reserved: [u8; 38],
pub version: u16,
pub reserved_2: [u8; 248],
pub entry: Option<ThreadEntry>,
pub reserved_3: [u8; 40],
pub name: ThreadName,
pub name_addr: *mut u8,
pub reserved_4: [u8; 32],
}
Fields
self_ref: *mut Thread
state: ThreadState
owns_stack: bool
pad: [u8; 2]
handle: Handle
stack: *mut u8
stack_size: usize
reserved: [u8; 38]
version: u16
reserved_2: [u8; 248]
entry: Option<ThreadEntry>
reserved_3: [u8; 40]
name: ThreadName
name_addr: *mut u8
reserved_4: [u8; 32]
Implementations
sourceimpl Thread
impl Thread
pub const fn empty() -> Self
pub fn new_remote(
handle: Handle,
name: &str,
stack: *mut u8,
stack_size: usize
) -> Result<Self>
pub fn new_with_stack<T: Copy, F: 'static + Fn(&T)>(
entry: F,
args: &T,
name: &str,
stack: *mut u8,
stack_size: usize
) -> Result<Self>
pub fn new<T: Copy, F: 'static + Fn(&T)>(
entry: F,
args: &T,
name: &str,
stack_size: usize
) -> Result<Self>
pub fn initialize(&mut self, priority: i32, processor_id: i32) -> Result<()>
pub fn start(&mut self) -> Result<()>
pub fn join(&mut self) -> Result<()>
pub fn is_remote(&self) -> bool
pub fn get_handle(&self) -> Handle
pub fn get_priority(&self) -> Result<i32>
pub fn get_id(&self) -> Result<u64>
Trait Implementations
Auto Trait Implementations
impl RefUnwindSafe for Thread
impl !Send for Thread
impl !Sync for Thread
impl Unpin for Thread
impl UnwindSafe for Thread
Blanket Implementations
impl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstablefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more