From ae89275c6871d5cc24e1f485fa5065d96ae6b2fe Mon Sep 17 00:00:00 2001 From: antifallobst Date: Sat, 4 Mar 2023 17:53:23 +0100 Subject: [PATCH] docs: updated thread safety helper documentation --- .wiki/Kernel-documentation.md | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/.wiki/Kernel-documentation.md b/.wiki/Kernel-documentation.md index d723122..3b0e299 100644 --- a/.wiki/Kernel-documentation.md +++ b/.wiki/Kernel-documentation.md @@ -1327,10 +1327,18 @@ Always returns **false**, if the index is out of the bitmaps size bounds. ### core.h 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 This halts until **_a_** is true. 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 This halts forever and warns about this in the log.