- Document CRITICAL_ASSERT() in this man page.
- Clarify that a thread may also handle interrupts in a critical section, not only faults/exceptions.
FWIW kassert.h is included from systm.h
... which do not result in a context switch on interrupt exit, instead the context switch is postponed to the critical section exit.
s/are not required to provide/do not provide/ ?
... which might need a context switch to operate.
Might be, it is useful to say that critical section is similar to disabling interrupts, but incurs less overhead and less latency for the filtered interrupt handlers.
Also, it might be useful to note that abusing critical sections affects system latency for interrupt handling, and timers precision.
I restored it to systm.h in all cases. I could not find a way to cleanly communicate
#include <sys/kassert.h> OR #include <sys/systm.h>
in the synopsis section, or any existing example of this. Maybe someone has a suggestion.