|
SuperTinyKernel™ RTOS 1.08.x
Lightweight, high-performance, deterministic, bare-metal C++ RTOS for resource-constrained embedded systems. MIT Open Source License.
|
Lock object behind Newlib's opaque _LOCK_T (struct __lock *). More...
Public Types | |
| enum | EKind : uint8_t { KIND_NONE = 0 , KIND_PLAIN , KIND_RECURSIVE } |
Public Attributes | |
| EKind | kind |
| kind of the constructed mutex | |
| bool | dynamic |
| true if taken from the lock pool by __retarget_lock_init* (and therefore returned by close) | |
| stk::IMutex * | mutex |
| constructed FastMutex (KIND_PLAIN) or Mutex (KIND_RECURSIVE), otherwise nullptr | |
| uint8_t | storage [STORAGE_SIZE] |
Static Public Attributes | |
| static const size_t | STORAGE_SIZE |
| storage large enough for either mutex type | |
Lock object behind Newlib's opaque _LOCK_T (struct __lock *).
Holds either a FastMutex (plain lock) or a Mutex (recursive lock), constructed in-place in storage. The same layout serves dynamic locks (taken from the static lock pool by __retarget_lock_init*) and Newlib's static locks (zero-initialized BSS objects, constructed lazily on first use).
Definition at line 43 of file stk_newlib.cpp.
| enum __lock::EKind : uint8_t |
| Enumerator | |
|---|---|
| KIND_NONE | not constructed (zero-initialized static lock) |
| KIND_PLAIN | FastMutex. |
| KIND_RECURSIVE | Mutex. |
Definition at line 45 of file stk_newlib.cpp.
| bool __lock::dynamic |
true if taken from the lock pool by __retarget_lock_init* (and therefore returned by close)
Definition at line 57 of file stk_newlib.cpp.
| EKind __lock::kind |
kind of the constructed mutex
Definition at line 56 of file stk_newlib.cpp.
| stk::IMutex* __lock::mutex |
constructed FastMutex (KIND_PLAIN) or Mutex (KIND_RECURSIVE), otherwise nullptr
Definition at line 58 of file stk_newlib.cpp.
| uint8_t __lock::storage[STORAGE_SIZE] |
Definition at line 60 of file stk_newlib.cpp.
|
static |
storage large enough for either mutex type
Definition at line 53 of file stk_newlib.cpp.