Module to declare HAL Atomic API. More...
Functions |
|
| void | hal_atomic_start (atomic_t *p_atomic) |
|
Enters atomic section.
More...
|
|
| void | hal_atomic_end (atomic_t *p_atomic) |
|
Exits atomic section.
More...
|
|
Detailed Description
Module to declare HAL Atomic API.
The Atomic module implements atomic section interface. This is made by disabling the global interrupts, which is a hardware dependent feature. The user may call hal_atomic_start() to open an atomic section (disable interrupts) and hal_atomic_end() to exit from the section (restore interrupts). The algorithm supports nesting sections.
Function Documentation
| void hal_atomic_end | ( | atomic_t * | p_atomic | ) |
Exits atomic section.
Restores status register
- Parameters
-
[in] p_atomic pointer to buffer to restore current value of the status register from.
| void hal_atomic_start | ( | atomic_t * | p_atomic | ) |
Enters atomic section.
Disables global interrupts.
- Parameters
-
[in] p_atomic pointer to buffer to store current value of the status register.