|
|
typedef volatile uint32_t | mutex_t |
| |
|
| void | hal_mutex_init (mutex_t *p_mutex) |
| | Configures mutex lock before first usage. More...
|
| |
| void | hal_mutex_lock (mutex_t *p_mutex) |
| | Atomically sets mutex. If set is failed, enters spin lock loop. More...
|
| |
| void | hal_mutex_unlock (mutex_t *p_mutex) |
| | Atomically clears mutex. Every other thread, spinning at this lock may try to lock it afterwards. More...
|
| |
NRF52 implementation is void and PC implementation is identical to atomic.
| void hal_mutex_init |
( |
mutex_t * |
p_mutex | ) |
|
Configures mutex lock before first usage.
- Parameters
-
| [in,out] | p_mutex | pointer to mutex variable. |
| void hal_mutex_lock |
( |
mutex_t * |
p_mutex | ) |
|
Atomically sets mutex. If set is failed, enters spin lock loop.
- Parameters
-
| [in] | p_mutex | pointer to mutex variable. |
| void hal_mutex_unlock |
( |
mutex_t * |
p_mutex | ) |
|
Atomically clears mutex. Every other thread, spinning at this lock may try to lock it afterwards.
- Parameters
-
| [in] | p_mutex | pointer to mutex variable. |