wait_event_...ble_lock_irq(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

🌸 NAME 🌸

okay so bestie, welcome to the Kernel API Manual β€” this is the wait_event_...ble_lock_irq(9) page for wait_event_interruptible_lock_irq, and she is literally: sleep until a condition gets true. The condition is checked under the lock. This is expected to be called with the lock taken. πŸ’…


✨ SYNOPSIS ✨

wait_event_interruptible_lock_irq (wq_head , condition , lock );

πŸŽ€ ARGUMENTS πŸŽ€

  • wq_head β€” the waitqueue to wait on. πŸ›Œ
  • condition β€” a C expression for the event to wait for. πŸ‘€
  • lock β€” a locked spinlock_t, which will be released before schedule and reacquired afterwards. πŸ”

πŸ’… DESCRIPTION πŸ’…

okay so your process gets put to sleep in TASK_INTERRUPTIBLE until the condition evaluates to true or signal is received. The condition gets checked every single time the waitqueue wq_head is woken up. πŸ‘‘

wake_up has to be called after changing any variable that could change the result of the wait condition. no cap, that's the rule. 🫢

this macro is supposed to be called while holding the lock. The lock is dropped before going to sleep and is reacquired afterwards. so yes, she lets go of the lock for her lil nap and then grabs it right back. πŸ’…

return vibes: the macro will return -ERESTARTSYS if it was interrupted by a signal, and 0 if condition evaluated to true. that's the whole mood. ✨

πŸ¦‹ SEE ALSO πŸ¦‹

the whole waitqueue friend group is linked from Kernel file ./include/linux/wait.h β€” every single reference, periodt:


okay bye bestie πŸ’– this page is from ./include/linux, October 2026, and it's the wait_event_...ble_lock_irq(9) manual page signing off. stay sleepy, stay locked, slay. πŸŽ€

πŸ“¦ where this page comes from