pub struct ClockMonotonicHandle(/* private fields */);Expand description
POSIX opaque handle types for OS primitives.
These handles are opaque pointers used to reference POSIX/pthread-backed
objects. They should not be dereferenced directly; instead, use the safe
wrappers provided by this crate (e.g., Thread, Queue, Semaphore, etc.).
Backing handle for crate::os::Queue, crate::os::Semaphore and
crate::os::EventGroup: a pthread_mutex_t + pthread_cond_t pair.
These three primitives share the same “wait on a condition, guarded by a
mutex” shape, so they all reuse this one handle type (see
QueueHandle, SemaphoreHandle, EventGroupHandle) instead of
each defining their own. Not constructible from outside this crate other
than via Default; the safe wrapper types are what application code
should use.
§Examples
use osal_rs::os::types::ClockMonotonicHandle;
// A never-initialized handle reports as empty.
let handle = ClockMonotonicHandle::default();
assert!(handle.is_empty());Implementations§
Trait Implementations§
Source§impl Debug for ClockMonotonicHandle
impl Debug for ClockMonotonicHandle
Source§impl Default for ClockMonotonicHandle
impl Default for ClockMonotonicHandle
Source§fn default() -> ClockMonotonicHandle
fn default() -> ClockMonotonicHandle
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl Freeze for ClockMonotonicHandle
impl RefUnwindSafe for ClockMonotonicHandle
impl Send for ClockMonotonicHandle
impl Sync for ClockMonotonicHandle
impl Unpin for ClockMonotonicHandle
impl UnsafeUnpin for ClockMonotonicHandle
impl UnwindSafe for ClockMonotonicHandle
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