wake_const_ops(9)
π wake_const_ops(9)
okay bestie, welcome to the kernel API manual for wake_const_ops(9) β yes that's the page title and the function name, we love a consistent queen β¨
πΈ NAME
wake_const_ops β wake up non-alter tasks π«Ά
π SYNOPSIS
int wake_const_ops (struct sem_array *sma , int semnum , struct
wake_q_head *wake_q );
like, she takes three things and gives you back an int, periodt π
β¨ ARGUMENTS
smaβ the semaphore array. that's her house πsemnumβ the semaphore that was modified. the specific one, no cap πwake_qβ the lockless wake-queue head. lockless!! iconic π¦
π DESCRIPTION
okay so here's the tea β β wake_const_ops must be called after a semaphore in a semaphore array was set to 0. like, that's the whole prerequisite, don't skip it π
if complex const operations are pending, wake_const_ops must be called with semnum = -1, as well as with the number of each modified semaphore. both! not one or the other! fr fr π’
the tasks that must be woken up get added to wake_q β she's collecting them like pokΓ©mon π§
the return code is stored in q->pid. yes, that q->pid. π
and the function returns 1 if at least one operation was completed successfully. so a 1 here is a slay, basically π
π¦ SEE ALSO
kernel file ./ipc/sem.c β and her whole friend group π
unmerge_queues(9)merge_queues(9)newary(9)do_smart_wakeup_zero(9)update_queue(9)set_semotime(9)do_smart_update(9)find_alloc_undo(9)
and that's the page!! π« this one lives in ./ipc, dated October 2026, and it's filed under wake_const_ops(9) β go off, kernel API manual, you ate π₯π
π¦ 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