wake_up_pollfree(9)
π wake_up_pollfree β a Kernel API Manual moment (section 9, bestie)
okay so this one is from the Kernel API Manual, section 9, and it's genuinely such a niche little icon. like, nobody knows her, but the people who know her know her, iykyk. π
β¨ NAME β¨
wake_up_pollfree β the function that's literally like "hey bestie, this polled waitqueue is leaving the party, say your goodbyes" π
π¦ SYNOPSIS π¦
void wake_up_pollfree (struct wait_queue_head *wq_head );
one function, one pointer, no drama.
πΈ ARGUMENTS πΈ
wq_headβ the wait queue head. that's it. that's the whole personality. the wait queue head in question, the main character of this argument list π
π DESCRIPTION π
okay so picture this: in the very rare cases (like, very rare, we're talking "you will probably never touch this in your whole kernel career" rare π) where a ->poll implementation uses a waitqueue whose lifetime is tied to a task instead of the struct file being polled β you have to call this function before the waitqueue gets freed. why? bc otherwise the non-blocking polls (think epoll, the girlies who poll without blocking β¨) never find out that the queue is going away. and that's rude. and also a bug. π
the vibe check: call wake_up_pollfree first, free after. not the other way around, bestie, i'm begging π«Ά
and there's a whole second requirement, no cap: the caller must also RCU-delay the freeing of the wait_queue_head. like, how? any of these ways, pick your slay:
- an explicit
synchronize_rcu - or
call_rcu - or
SLAB_TYPESAFE_BY_RCU
that's not optional, that's not a suggestion, that's the rules. β
π₯ SEE ALSO π₯
buckle up bestie, this list is long β the whole waitqueue friend group showed up to the function. π
Kernel file ./include/linux/wait.h waitqueue_active(9)wq_has_single_sleeper(9)wq_has_sleeper(9)wait_event(9)wait_event_freezable(9)wait_event_timeout(9)wait_event_cmd(9)wait_event_interruptible(9)wait_event_interruptible_timeout(9)wait_event_hrtimeout(9)wait_event_interruptible_hrtimeout(9)wait_event_idle(9)wait_event_idle_exclusive(9)wait_event_idle_timeout(9)wait_event_idle_exclusive_timeout(9)wait_event_interruptible_locked(9)wait_event_interruptible_locked_irq(9)wait_event_interruptible_exclusive_locked(9)wait_event_interruptible_exclusive_locked_irq(9)wait_event_killable(9)wait_event_state(9)wait_event_killable_timeout(9)wait_event_lock_irq_cmd(9)wait_event_lock_irq(9)wait_event_interruptible_lock_irq_cmd(9)wait_event_interruptible_lock_irq(9)wait_event_interruptible_lock_irq_timeout(9)
like i said. the whole friend group. no one got left out of this SEE ALSO, periodt π§
okay that's the whole page!! mwah π this one comes from ./include/linux, dated October 2026 β hope you had the most slay time reading about a waitqueue going away, love u, bye πβ¨
π¦ 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