__futex_unqueue(9)
π
__futex_unqueue β like, the whole vibe
okay so bestie, welcome to the Kernel API Manual (that's the manual name, iykyk) β this is section 9 and we're talking about one very specific little function. sit down, grab a strawberry π, let's go.
β¨ NAME β¨
__futex_unqueue β remove the futex_q from its futex_hash_bucket
that's it. that's the whole job. it takes the futex_q out of the bucket it's sitting in. no cap, it's that simple π
π¦ SYNOPSIS π¦
void __futex_unqueue (struct futex_q *q );
just like that, one argument, void return, no drama π
πΈ ARGUMENTS πΈ
qβ thestruct futex_qyou want to unqueue. that's the one getting yanked out of the hash bucket, periodt.
π DESCRIPTION π
okay so here's the part where you actually have to pay attention, bestie, because there's a rule and the rule is not optional π
q->lock_ptr must not be NULL, and it must be held by the caller.
that's it. that's the whole contract. call it with a NULL lock_ptr and it's giving disaster. call it without holding the lock and it's giving β undefined vibe check β. so like, hold the lock. it's not a suggestion, it's a requirement, fr fr π₯
π₯ SEE ALSO π₯
the whole friend group, honestly π«Ά:
__futex_hash(9)futex_setup_timer(9)get_futex_key(9)fault_in_user_writeable(9)futex_top_waiter(9)wait_for_owner_exiting(9)futex_unqueue(9)futex_exit_recursive(9)
and they all live in the kernel file ./kernel/futex/core.c β go say hi, they're iconic π
quick lil heads up:futex_unqueue(9)(no underscores up front) and our girl__futex_unqueue(9)are both in that list and they are not the same function. don't mix them up bestie, that's a whole different vibe π
π okay that's the page!! big slay, you now understand __futex_unqueue better than 90% of people on this planet, lowkey. this came to you from ./kernel/futex, dated October 2026, and it's literally titled __futex_unqueue(9) because of course it is. bye bestie, go hold a lock responsibly πβ¨
π¦ 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