STRUCT TB_SERVICE(9)
π NAME π
struct tb_service β the Thunderbolt service struct, bestie β¨
okay so real quick, this page is straight out of the Kernel API Manual and it's all about struct tb_service in <pink>struct tb_service(9)</pink> β like the little baby struct that represents one Thunderbolt service π¦ iykyk
β¨ SYNOPSIS β¨
okay don't panic, here's the whole thing, typed out exactly, no cap:
struct tb_service {
struct device dev;
int id;
const char *key;
u32 prtcid;
u32 prtcvers;
u32 prtcrevs;
u32 prtcstns;
struct mutex lock;
struct tb_property_dir *local_properties;
struct tb_property_dir *remote_properties;
struct dentry *debugfs_dir;
};
like, that's the whole vibe check right there π
πΈ Members πΈ
okay so now we go through every single field one by one because we do NOT skip β¨
devβ the XDomain device πidβ the ID of the service, and yes bestie it's shown in sysfs π«Άkeyβ the protocol key, grabbed from the properties directory πprtcidβ the protocol ID, from the properties directory β¨prtcversβ the protocol version, from the properties directory πprtcrevsβ the protocol software revision, from the properties directory πprtcstnsβ the protocol settings mask, from the properties directory πlockβ protects this structure, like a little bodyguard for the struct πlocal_propertiesβ properties owned by the service driver πremote_propertiesβ properties read from the remote service, and these are read-only, so don't even think about writing to them πdebugfs_dirβ pointer to the service debugfs directory. it's always created when debugfs is enabled, and service drivers can use it to add their own entries under the service π¦
π Description π
so basically, each domain exposes a set of services it supports as a collection of properties π and for each service there's gonna be one corresponding struct tb_service. the service drivers get bound to these, that's just how it goes β¨
now, service drivers can add their own dynamic properties to local_properties β slay, go off β but whenever they do so, lock must be held. fr fr, held. every time π«Ά not optional, not negotiable π
bestie listen: thelockthing is not a suggestion, ok? if you're touchinglocal_propertiesyou're holdinglock. periodt π
π SEE ALSO π
- Kernel file
./include/linux/thunderbolt.hβ go read it, it's giving main character energy π enum tb_security_level(9)struct tb(9)struct tb_property_dir(9)struct tb_property(9)enum tb_link_width(9)struct tb_xdomain(9)struct tb_protocol_handler(9)struct tb_service_driver(9)struct tb_nhi(9)struct tb_ring(9)enum ring_desc_flags(9)struct ring_frame(9)tb_ring_rx(9)tb_ring_tx(9)tb_ring_dma_device(9)
like, that's a whole friend group of references, and they all ate π β¨
and that's the page, bestie π«Ά it lives in ./include/linux, it's tagged October 2026, and if you ever forget what page you're on just remember: struct tb_service(9) π mwah, go hold that lock π
π¦ 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