tb_ring_poll(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’– tb_ring_poll(9) β€” bestie edition πŸ’–

okay so this is a page straight out of the Kernel API Manual, and it's literally called tb_ring_poll(9) β€” yes the number is part of the name, that's just how kernel manpages do it, iykyk πŸŽ€


🌸 NAME 🌸

tb_ring_poll β€” poll one completed frame from the ring πŸ¦‹

like… grab exactly one finished frame out of the ring. one. just one. ✨

✨ SYNOPSIS ✨

struct ring_frame * tb_ring_poll (struct tb_ring *ring );

that's the whole signature, copy it exactly bestie, no cap πŸ’…

πŸŽ€ ARGUMENTS πŸŽ€

  • ring β€” the ring you're polling πŸ’– (the ring to poll, that's the whole vibe)

πŸ”₯ DESCRIPTION πŸ”₯

so here's when you're allowed to call this, and it is lowkey specific:

  • when the start_poll callback of the ring has been called, OR
  • the ring was created with RING_FLAG_NO_INTERRUPT 🫢

in those cases this function will read one completed frame from the ring and return it to the caller. that's it. one frame. it's giving minimalism, it's giving "one job and it does it" πŸ‘‘

⭐ RETURN ⭐

it hands you back a pointer to struct ring_frame πŸ’«

and if there are no more completed frames? you get NULL. that's the signal, don't ignore it πŸ™ˆ

🌈 SEE ALSO 🌈

Kernel file ./drivers/thunderbolt/nhi.c β€” go read it, it's the main character of this whole story πŸ“–

all of these, no skips, collect them like PokΓ©mon πŸ§šπŸ’œ


and that's the whole page bestie πŸŽ€ sign-off time: this one lives in ./drivers/thunderbolt, dated October 2026 β€” periodt, end of page, go poll some rings πŸ’…βœ¨πŸŒΈ

πŸ“¦ where this page comes from