Type Definition r3::kernel::raw::SemaphoreValue

source ·
pub type SemaphoreValue = usize;
Expand description

Unsigned integer type representing the number of permits held by a semaphore.

Rationale: On the one hand, using a data type with a target-dependent size can hurt portability. On the other hand, a fixed-size data type such as u32 can significantly increase the runtime overhead on extremely constrained targets such as AVR and MSP430. In addition, many RISC targets handle small data types less efficiently. The portability issue shouldn’t pose a problem in practice.