provides the platform specific configuration for task manager
More...
Go to the source code of this file.
|
|
typedef uint32_t | pintype_t |
|
typedef TimerTask *volatile | tm_internal::TimerTaskAtomicPtr |
|
typedef volatile bool | tm_internal::TmAtomicBool |
|
typedef uint16_t | sched_t |
|
|
critical_section_t * | tm_internal::tmLock |
provides the platform specific configuration for task manager
◆ atomicSwapBool()
| bool tm_internal::atomicSwapBool |
( |
volatile bool * | ptr, |
|
|
bool | expected, |
|
|
bool | newValue ) |
|
inline |
Sets the boolean to the new value ONLY when the existing value matches expected.
- Parameters
-
| ptr | the bool memory location to compare / swap |
| expected | the expected value |
| newValue | the replacement, replaced on if expected matches |
- Returns
- true if the replacement was done, otherwise false
◆ atomicReadBool()
| bool tm_internal::atomicReadBool |
( |
TmAtomicBool * | pPtr | ) |
|
|
inline |
Reads the value in an atomic boolean object
Reads an atomic boolean value
- Parameters
-
| pPtr | the pointer to an atomic boolean value |
- Returns
- the boolean value.
◆ atomicWriteBool()
| void tm_internal::atomicWriteBool |
( |
TmAtomicBool * | pPtr, |
|
|
bool | newVal ) |
|
inline |
Writes a boolean value atomically
- Parameters
-
| pPtr | the atomic ref |
| newVal | the new value |
◆ atomicReadPtr()
| TimerTask * tm_internal::atomicReadPtr |
( |
TimerTaskAtomicPtr * | pPtr | ) |
|
|
inline |
Dereferences and returns the value of the pointer at ptr type. On mbed boards this is already an atomic operation and therefore volatile is enough.
- Template Parameters
-
| PTR_TYPE | class type of the pointer |
- Parameters
-
| pPtr | reference to memory of the pointer |
- Returns
- the pointer.
◆ atomicWritePtr()
| void tm_internal::atomicWritePtr |
( |
TimerTaskAtomicPtr * | pPtr, |
|
|
TimerTask *volatile | newValue ) |
|
inline |
Dereferences and then sets the memory of the pointer type. On mbed boards this is already an atomic operation
- Template Parameters
-
- Parameters
-