tb_ctl_alloc(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

✨ tb_ctl_alloc(9) ✨

ok so bestie, welcome to the Kernel API Manual πŸ’– this one's a function page β€” tb_ctl_alloc β€” and it's literally the glow-up moment where a control channel gets born πŸŽ€


🌸 NAME 🌸

tb_ctl_alloc β€” allocate a control channel

yeah that's it, that's the whole vibe. it allocates a control channel. slay πŸ’…


πŸ¦‹ SYNOPSIS πŸ¦‹

struct tb_ctl * tb_ctl_alloc (struct tb_nhi *nhi , int index , int
timeout_msec , event_cb cb , void *cb_data );

look at her go 😭 five whole arguments, she's high maintenance but she's worth it.


πŸ’œ ARGUMENTS πŸ’œ

  • nhi β€” Pointer to NHI. that's the NHI, and you're handing over a pointer to it. iconic.
  • index β€” Domain number 🌈
  • timeout_msec β€” the default timeout used with non-raw control messages ⏱️ like, raw ones do their own thing, but these babies use this.
  • cb β€” Callback called for plug events πŸ”Œ every hot plug event, she's there.
  • cb_data β€” Data passed to cb 🫢 whatever you hand her here, she hands right back to your callback.

🧚 DESCRIPTION 🧚

So here's the whole tea, bestie: cb will be invoked once for every hot plug event. once. per. event. periodt πŸ”₯

that's it. that's the description. no cap, that's genuinely all she wrote.


⭐ RETURN ⭐

Returns a pointer to struct tb_ctl πŸ’– β€” or NULL on failure 😭 (iykyk, always check your pointers, don't be that girl).


πŸ‘‘ SEE ALSO πŸ‘‘

the whole friend group fr fr 🫢 go read them all, they're all serving.


πŸ’€ reminder bestie: this came out of ./drivers/thunderbolt and it's dated October 2026 β€” so like, write it down, cite it, or whatever it is you do with manpage dates. mwah πŸ’‹βœ¨

ok bye ily, go allocate something πŸ¦‹πŸ’…

πŸ“¦ where this page comes from