__futex_unqueue(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’… __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 β€” the struct futex_q you 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 🫢:

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