tb_ring_flush(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’… 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:

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