|
Internal Interface Wrap
API reference
|
No-op mutex backend – all operations compile to nothing. More...
#include <PlatformMutex.h>
Public Types | |
| using | RecursiveMutexHandle = uint8_t |
| Opaque handle for a recursive mutex (1 byte, unused by no-op backend) | |
| using | MutexHandle = uint8_t |
| Opaque handle for a regular (non-recursive) mutex (1 byte, unused) | |
Static Public Member Functions | |
| static constexpr void | createRecursive (RecursiveMutexHandle *) noexcept |
| Create a recursive mutex. Backend writes into *h. | |
| static constexpr void | destroyRecursive (RecursiveMutexHandle *) noexcept |
| Destroy a recursive mutex pointed to by *h. | |
| static constexpr bool | lockRecursive (RecursiveMutexHandle *, uint32_t) noexcept |
| Lock recursively with timeout (ticks). Returns true on success. | |
| static constexpr bool | tryLockRecursive (RecursiveMutexHandle *) noexcept |
| Try lock (non-blocking). Returns true on success. | |
| static constexpr void | unlockRecursive (RecursiveMutexHandle *) noexcept |
| Unlock recursive mutex. | |
| static constexpr void | createMutex (MutexHandle *) noexcept |
| Create a regular (non-recursive) mutex. Backend writes into *h. | |
| static constexpr void | destroyMutex (MutexHandle *) noexcept |
| Destroy a regular mutex pointed to by *h. | |
| static constexpr bool | lockMutex (MutexHandle *, uint32_t) noexcept |
| Lock with timeout (ticks). Returns true on success. | |
| static constexpr bool | tryLockMutex (MutexHandle *) noexcept |
| Try lock (non-blocking). Returns true on success. | |
| static constexpr void | unlockMutex (MutexHandle *) noexcept |
| Unlock regular mutex. | |
| static constexpr uint32_t | getTickCount () noexcept |
| Get current RTOS tick count. | |
| static constexpr uint32_t | msToTicks (uint32_t ms) noexcept |
| Convert milliseconds to RTOS ticks. | |
| static constexpr void | yield () noexcept |
| Yield to other tasks (no-op in single-threaded). | |
Static Public Attributes | |
| static constexpr uint32_t | MAX_DELAY = 0xFFFFFFFFU |
| Infinite wait. | |
| static constexpr uint32_t | TICK_RATE_HZ = 1000U |
| Assumed tick rate. | |
No-op mutex backend – all operations compile to nothing.
This is the default backend when no RTOS or threading support is configured. Handle types are minimal (uint8_t) so mutex members occupy a single byte. Every operation is constexpr / inline and produces no machine code.
This struct also serves as the DOCUMENTATION of the backend contract: any concrete backend must provide the exact same set of static methods with compatible signatures.
Opaque handle for a regular (non-recursive) mutex (1 byte, unused)
Opaque handle for a recursive mutex (1 byte, unused by no-op backend)
|
inlinestaticconstexprnoexcept |
Create a regular (non-recursive) mutex. Backend writes into *h.
|
inlinestaticconstexprnoexcept |
Create a recursive mutex. Backend writes into *h.
|
inlinestaticconstexprnoexcept |
Destroy a regular mutex pointed to by *h.
|
inlinestaticconstexprnoexcept |
Destroy a recursive mutex pointed to by *h.
Get current RTOS tick count.
|
inlinestaticconstexprnoexcept |
Lock with timeout (ticks). Returns true on success.
|
inlinestaticconstexprnoexcept |
Lock recursively with timeout (ticks). Returns true on success.
Convert milliseconds to RTOS ticks.
|
inlinestaticconstexprnoexcept |
Try lock (non-blocking). Returns true on success.
|
inlinestaticconstexprnoexcept |
Try lock (non-blocking). Returns true on success.
|
inlinestaticconstexprnoexcept |
Unlock regular mutex.
|
inlinestaticconstexprnoexcept |
Unlock recursive mutex.
Yield to other tasks (no-op in single-threaded).