__wake_up_locked_sync_key(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ¦‹ NAME πŸ¦‹

__wake_up_locked_sync_key β€” and yes bestie, this is the Kernel API Manual page for it β€” wakes up a thread blocked on a locked waitqueue. That's the whole assignment πŸ’…

✨ SYNOPSIS ✨

void __wake_up_locked_sync_key (struct wait_queue_head *wq_head , unsigned int mode , void *key );

πŸŽ€ ARGUMENTS πŸŽ€

  • wq_head β€” the waitqueue. literally the queue we're working with 🫢
  • mode β€” which threads. it picks who gets the wakeup energy ✨
  • key β€” opaque value to be passed to wakeup targets. it's giving β€œjust pass it through, no questions” πŸŽ€

πŸ’– DESCRIPTION πŸ’–

Okay so the sync wakeup is different: the waker knows that it will schedule away soon, so while the target thread will be woken up, it will not be migrated to another CPU β€” ie. the two threads are 'synchronized' with each other. This can prevent needless bouncing between CPUs. no cap, that's a cute little CPU-drama reducer πŸ’…

On UP it can prevent extra preemption. iconic behavior honestly ⭐

Also important: if this function wakes up a task, it executes a full memory barrier before accessing the task state. that's a whole memory-barrier moment β€” don't sleep on it πŸ”₯

🌈 SEE ALSO 🌈

Kernel file ./kernel/sched/wait.c has the receipts: __wake_up(9), __wake_up_sync_key(9), and finish_wait(9). go read those too bestie πŸ“šβœ¨


This page is from ./kernel/sched, dated October 2026, and it's literally called __wake_up_locked_sync_key(9) β€” bye bestie, slay your waitqueues πŸ’–πŸ¦‹βœ¨

πŸ“¦ where this page comes from