Struct machinery_api::foundation::OsThreadApi[][src]

#[repr(C)]
pub struct OsThreadApi {
Show 23 fields pub create_critical_section: Option<unsafe extern "C" fn(cs: *mut CriticalSectionO)>, pub enter_critical_section: Option<unsafe extern "C" fn(cs: *mut CriticalSectionO)>, pub leave_critical_section: Option<unsafe extern "C" fn(cs: *mut CriticalSectionO)>, pub destroy_critical_section: Option<unsafe extern "C" fn(cs: *mut CriticalSectionO)>, pub create_semaphore: Option<unsafe extern "C" fn(initial_count: u32) -> SemaphoreO>, pub semaphore_add: Option<unsafe extern "C" fn(sem: SemaphoreO, count: u32)>, pub semaphore_wait: Option<unsafe extern "C" fn(sem: SemaphoreO)>, pub semaphore_poll: Option<unsafe extern "C" fn(sem: SemaphoreO) -> bool>, pub destroy_semaphore: Option<unsafe extern "C" fn(sem: SemaphoreO)>, pub thread_id: Option<unsafe extern "C" fn() -> u32>, pub processor_id: Option<unsafe extern "C" fn() -> u32>, pub create_thread: Option<unsafe extern "C" fn(entry: ThreadEntryF, user_data: *mut c_void, stack_size: u32, debug_name: *const c_char) -> ThreadO>, pub set_thread_priority: Option<unsafe extern "C" fn(thread: ThreadO, priority: OsThreadPriority)>, pub wait_for_thread: Option<unsafe extern "C" fn(thread: ThreadO)>, pub thread_id_from_tm_thread: Option<unsafe extern "C" fn(thread: ThreadO) -> u32>, pub convert_thread_to_fiber: Option<unsafe extern "C" fn(user_data: *mut c_void) -> FiberO>, pub convert_fiber_to_thread: Option<unsafe extern "C" fn()>, pub create_fiber: Option<unsafe extern "C" fn(entry: FiberEntryF, user_data: *mut c_void, stack_size: u32) -> FiberO>, pub destroy_fiber: Option<unsafe extern "C" fn(fiber: FiberO)>, pub switch_to_fiber: Option<unsafe extern "C" fn(fiber: FiberO)>, pub fiber_user_data: Option<unsafe extern "C" fn() -> *mut c_void>, pub yield_processor: Option<unsafe extern "C" fn()>, pub sleep: Option<unsafe extern "C" fn(seconds: f64)>,
}

Fields

create_critical_section: Option<unsafe extern "C" fn(cs: *mut CriticalSectionO)>enter_critical_section: Option<unsafe extern "C" fn(cs: *mut CriticalSectionO)>leave_critical_section: Option<unsafe extern "C" fn(cs: *mut CriticalSectionO)>destroy_critical_section: Option<unsafe extern "C" fn(cs: *mut CriticalSectionO)>create_semaphore: Option<unsafe extern "C" fn(initial_count: u32) -> SemaphoreO>semaphore_add: Option<unsafe extern "C" fn(sem: SemaphoreO, count: u32)>semaphore_wait: Option<unsafe extern "C" fn(sem: SemaphoreO)>semaphore_poll: Option<unsafe extern "C" fn(sem: SemaphoreO) -> bool>destroy_semaphore: Option<unsafe extern "C" fn(sem: SemaphoreO)>thread_id: Option<unsafe extern "C" fn() -> u32>processor_id: Option<unsafe extern "C" fn() -> u32>create_thread: Option<unsafe extern "C" fn(entry: ThreadEntryF, user_data: *mut c_void, stack_size: u32, debug_name: *const c_char) -> ThreadO>set_thread_priority: Option<unsafe extern "C" fn(thread: ThreadO, priority: OsThreadPriority)>wait_for_thread: Option<unsafe extern "C" fn(thread: ThreadO)>thread_id_from_tm_thread: Option<unsafe extern "C" fn(thread: ThreadO) -> u32>convert_thread_to_fiber: Option<unsafe extern "C" fn(user_data: *mut c_void) -> FiberO>convert_fiber_to_thread: Option<unsafe extern "C" fn()>create_fiber: Option<unsafe extern "C" fn(entry: FiberEntryF, user_data: *mut c_void, stack_size: u32) -> FiberO>destroy_fiber: Option<unsafe extern "C" fn(fiber: FiberO)>switch_to_fiber: Option<unsafe extern "C" fn(fiber: FiberO)>fiber_user_data: Option<unsafe extern "C" fn() -> *mut c_void>yield_processor: Option<unsafe extern "C" fn()>sleep: Option<unsafe extern "C" fn(seconds: f64)>

Implementations

Trait Implementations

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

Returns the “default value” for a type. Read more

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Performs the conversion.

Performs the conversion.

The resulting type after obtaining ownership.

Creates owned data from borrowed data, usually by cloning. Read more

🔬 This is a nightly-only experimental API. (toowned_clone_into)

recently added

Uses borrowed data to replace owned data, usually by cloning. Read more

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.