This repository has been archived on 2023-09-28. You can view files and clone it, but cannot push or open issues or pull requests.
homepage/content/projects/noxos/docs/codebase/utils/core.h.md

20 lines
820 B
Markdown
Raw Normal View History

---
title: "core.h"
summary: "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, consider using [CORE_INTERRUPTABLE_HALT_WHILE](https://nerdcult.net/projects/noxos/docs/codebase/utils/core.h/#core_interruptable_halt_whilea---macro) instead.
# `CORE_HALT_FOREVER` - macro
This halts forever and warns about this in the log.