tb_ring_flush(9)
π tb_ring_flush(9) β the Kernel API Manual glow-up π¦
ok so this is tb_ring_flush, from the Kernel API Manual (section 9, kernel girlies know β¨). it's a tiny function and honestly it's giving "small but mighty" energy β let's get into it π
β¨ NAME β¨
tb_ring_flush β literally just waits for a ring to be empty. that's it. that's the whole job π«Ά
πΈ SYNOPSIS πΈ
bool tb_ring_flush (struct tb_ring *ring , unsigned int timeout_msec );
returns a bool, takes a struct tb_ring * and an unsigned int, no cap π
π¦ ARGUMENTS π¦
ringβ the ring you're waiting on. yes, that ring. the one you want to be empty πtimeout_msecβ how long you're willing to wait, in ms. your patience budget, basically β³
π DESCRIPTION π
ok so here's the vibe: you can call this before stopping a ring to make sure all the frames submitted prior have been completed. like, you're about to shut the door so you double-check everybody already left the party πͺβ¨
no frames left hanging, no awkward "wait were you still in there" moment. iconic behavior, honestly.
π RETURN π
trueβ the ring is empty now, bestie. mission accomplished, we ate πfalseβ nope, not empty. false otherwise, fr fr π
π SEE ALSO π
bestie the whole friend group is here, all in the kernel file ./drivers/thunderbolt/nhi.c:
tb_ring_poll(9)tb_ring_poll_complete(9)tb_ring_alloc_tx(9)tb_ring_alloc_rx(9)tb_ring_start(9)tb_ring_stop(9)tb_ring_throttling(9)nhi_mailbox_cmd(9)nhi_mailbox_mode(9)
lowkey go read tb_ring_stop(9) too since this one's whole personality is "call me before stopping a ring" π
anyway that's the page!! signing off from ./drivers/thunderbolt, dated October 2026 β stay empty, stay slay, 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