docs: updated thread safety helper documentation

This commit is contained in:
antifallobst 2023-03-04 17:53:23 +01:00
parent 664bb8eaee
commit ae89275c68
1 changed files with 8 additions and 0 deletions

View File

@ -1327,10 +1327,18 @@ Always returns **false**, if the index is out of the bitmaps size bounds.
### core.h ### core.h
All the utils, which I didn't know how to name. All the utils, which I didn't know how to name.
#### `CORE_INTERRUPTABLE_HALT_WHILE(a)` - macro
This halts until **_a_** is true.
Used when working with blocking variables in e.g. thread safe functions.
To avoid deadlocks, this macro won't halt, while the system is handling an interrupt.
#### `CORE_HALT_WHILE(a)` - macro #### `CORE_HALT_WHILE(a)` - macro
This halts until **_a_** is true. This halts until **_a_** is true.
Used when working with blocking variables in e.g. thread safe functions. Used when working with blocking variables in e.g. thread safe functions.
**Warning:** When a function containing this macro is used while handling an interrupt,
this could cause deadlocks, think about using `CORE_INTERRUPTABLE_HALT_WHILE` instead.
#### `CORE_HALT_FOREVER` - macro #### `CORE_HALT_FOREVER` - macro
This halts forever and warns about this in the log. This halts forever and warns about this in the log.