DELAY(9)
πΈ NAME πΈ
okay so bestie, welcome to DELAY(9) β it's the Kernel Developer's Manual page for delay and DELAY, and it's literally the microsecond delay page π
. No cap, that's the whole vibe.
β¨ SYNOPSIS β¨
#include <sys/param.h>
void
delay(unsigned int us);
void
DELAY(unsigned int us);
π« DESCRIPTION π«
So delay() and DELAY() wait approximately us microseconds. That's the tea β.
The delay is implemented as a machine loop, preventing events other than interrupt handlers for unmasked interrupts to run. Yes, that is the exact energy β a little busy-loop moment, but make it kernel β¨.
DELAY() is reentrant (doesn't modify any global kernel or machine state) and is safe to use in interrupt or process context. Highkey important, bestie π«Ά.
For long delays, condition variables should be considered, however they can only be used from process context and their resolution is limited by the system clock frequency. So likeβ¦ for the long-haul waits, look at condition variables, but respect the process-context-only rule and the clock-frequency limit, periodt π .
π SEE ALSO π
k bye bestie π¦π this lil icon is from Debian, dated July 20, 2011, and yes it's DELAY(9) β mwah ππ
π¦ where this page comes from
- nixpkgs unstable: netbsd-source 11.0
- Copyright (c) 2002 The NetBSD Foundation, Inc
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms