wait_event_...e_locked_irq(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’€ wait_event_...e_locked_irq(9) πŸ’€

okay so this is the manpage for wait_event_interruptible_exclusive_locked_irq, and the manual name is Kernel API Manual β€” folded in near the top like a little name tag, bestie 🫢 It’s giving sleep until a condition gets true, so let’s get into it πŸ’–

✨ NAME ✨

wait_event_interruptible_exclusive_locked_irq β€” sleep until a condition gets true πŸ˜΄βœ…

🌸 SYNOPSIS 🌸

wait_event_interruptible_exclusive_locked_irq (wq , condition );

πŸŽ€ ARGUMENTS πŸŽ€

  • wq β€” the waitqueue to wait on. This is the queue bestie is snoozing on πŸ›Œ
  • condition β€” a C expression for the event to wait for. It’s the β€œam I awake yet?” vibe check πŸ‘€

πŸ’… DESCRIPTION πŸ’…

The process is put to sleep (TASK_INTERRUPTIBLE) until the condition evaluates to true or a signal is received. The condition is checked each time the waitqueue wq is woken up. Not me checking it every single time β€” that’s literally the assignment πŸ”

It must be called with wq.lock being held. This spinlock is unlocked while sleeping but condition testing is done while lock is held and when this macro exits the lock is held. So like… the lock comes off for the nap, but the check and the exit are lock-on. Do not fumble this, fr fr πŸ”’πŸ˜­

The lock is locked/unlocked using spin_lock_irq/spin_unlock_irq functions which must match the way they are locked/unlocked outside of this macro. Matching energy only, no cap ⚑

The process is put on the wait queue with an WQ_FLAG_EXCLUSIVE flag set thus when other process waits process on the list if this process is awaken further processes are not considered. Exclusive main character energy, periodt πŸ‘‘βœ¨

wake_up_locked has to be called after changing any variable that could change the result of the wait condition. Change the variable β†’ call wake_up_locked, in that order, iykyk πŸ””

The function will return -ERESTARTSYS if it was interrupted by a signal and 0 if condition evaluated to true. Those are the two outcomes, bestie πŸ’–

🌈 SEE ALSO 🌈

Kernel file ./include/linux/wait.h is in the mix, and the whole reference squad is:


That’s the whole vibe check, bestie 🫢 Source/version is ./include/linux, dated October 2026, manual wait_event_...e_locked_irq(9) β€” slay, go forth and lock responsibly πŸ’œβœ¨

πŸ“¦ where this page comes from