update_queue(9)
πΈ NAME πΈ
Okay so this is update_queue(9), straight out of the Kernel API Manual, and it is literally the function that looks for tasks that can be completed. Bestie, that is the whole name vibe. π
β¨ SYNOPSIS β¨
int update_queue (struct sem_array *sma , int semnum , struct
wake_q_head *wake_q );
π ARGUMENTS π
smaβ a semaphore array. Yep, the whole array. π«Άsemnumβ the semaphore that was modified. This little number matters. πwake_qβ the lockless wake-queue head. Iconic lockless energy, no cap. π
π DESCRIPTION π
update_queue must be called after a semaphore in a semaphore array was modified. Like, that is the rule, bestie β do not skip it. β
If multiple semaphores were modified, update_queue must be called with semnum = -1, as well as with the number of each modified semaphore. So yes, -1 and every modified semaphoreβs number get their moment. π
The tasks that must be woken up are added to wake_q. The return code is stored in q->pid. The function internally checks if const operations can now succeed. π₯
The function returns 1 if at least one semop was completed successfully. That is the success signal, periodt. πβ¨
π₯ SEE ALSO π₯
Lowkey go check the Kernel file ./ipc/sem.c, plus these absolute icons: unmerge_queues(9), merge_queues(9), newary(9), wake_const_ops(9), do_smart_wakeup_zero(9), set_semotime(9), do_smart_update(9), and find_alloc_undo(9). π¦
Signed off from ./ipc, dated October 2026 β source/date vibe secured, and yes, this is the update_queue(9) manual page. Mwah. ππ
π¦ where this page comes from
- nixpkgs unstable: linux-manual 7.3.1
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms