wake_up_var_locked(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’– wake_up_var_locked(9) πŸ’–

okay so bestie, welcome to the kernel API manual, this one's wake_up_var_locked and it is literally the "hey wake up, your variable's ready" girlie of the kernel β€” except she does it while holding a lock, which is the whole vibe ✨


🌸 NAME 🌸

wake_up_var_locked β€” wake up the waiters for a variable while you're holding a spinlock or a mutex πŸŽ€

πŸ¦‹ SYNOPSIS πŸ¦‹

wake_up_var_locked (var , lock );

πŸ“ ARGUMENTS πŸ“

  • var β€” the address of the variable that's being waited on. yes, the actual address, not the value, we're being specific here πŸ’…
  • lock β€” the spinlock or mutex what protects the variable 😌 (that's the original's grammar and I'm keeping it, it's iconic)

πŸ’œ DESCRIPTION πŸ’œ

So what she does is: send a wake up for the given variable, and that variable should be waited for with wait_var_event_spinlock or wait_var_event_mutex. match made in heaven, no cap 🫢

And here's the slay part β€” unlike wake_up_var, no extra barriers are needed, because the locking provides sufficient sequencing. the lock is doing the heavy lifting, she's just showing up and being gorgeous ✨

fr fr though β€” this only makes sense if you're actually holding that lock, which is literally the name. the lock is the whole point, bestie 🌈

πŸ‘‘ SEE ALSO πŸ‘‘

Kernel file ./include/linux/wait_bit.h β€” go read her, she's the main character of this whole friend group πŸ’–


and that's the whole page, bestie, you ate that πŸ’…βœ¨ this lil gem lives in ./include/linux, dated October 2026, and it's wake_up_var_locked(9) β€” mwah, go wake something up (with the lock held, obviously) πŸ˜­πŸ’–

πŸ“¦ where this page comes from