tb_xdomain_...y_link_depth(9)
π tb_xdomain_find_by_link_depth(9) β a Kernel API Manual moment
okay bestie, so this is a page straight out of the Kernel API Manual and it's literally about finding an XDomain. yes, that kind of XDomain. Thunderbolt drama. let's get into it π¦
β¨ NAME β¨
tb_xdomain_find_by_link_depth β Find an XDomain by link and depth
like, that's it. that's the whole job. iconic behavior honestly π
πΈ SYNOPSIS πΈ
struct tb_xdomain * tb_xdomain_find_by_link_depth (struct tb *tb , u8
link , u8 depth );
here's your signature, no cap, copied exactly so don't come for me π
π ARGUMENTS π
tbβ the Domain where the XDomain belongs to. your home base, your main character setting πlinkβ Root switch link number. yes, root. the top of the tree, the CEO of the link hierarchy β¨depthβ Depth in the link. how far down we're digging. lowkey a metaphor for life ngl π
π₯ DESCRIPTION π₯
so what does it actually do? it Finds XDomain by walking through the Thunderbolt topology below tb. like, literally walking the tree. very "going on a little journey" of it π
and here's the important bit, bestie β the returned XDomain will have its reference count increased so the caller needs to call tb_xdomain_put when it is done with the object. do NOT forget the tb_xdomain_put. that's a leak and leaks are not slay, they're giving chaos π
π«Ά this will find all XDomains including the ones that are not yet added to the bus (handshake is still in progress). so yeah, mid-handshake XDomains are still invited to the party π
β οΈ okay this one's serious: the caller needs to hold tb->lock. hold the lock. HOLD the lock. no lock, no vibes, periodt.
β RETURN β
Pointer to struct tb_xdomain β or NULL if not found. that's it. found it or you didn't. very binary of it π
π SEE ALSO π
Kernel file ./drivers/thunderbolt/xdomain.c β go read the source, it's the whole vibe π
and here's the entire friend group, all in their (9) era:
tb_xdomain_response(9)tb_xdomain_request(9)tb_register_protocol_handler(9)tb_unregister_protocol_handler(9)tb_register_service_driver(9)tb_unregister_service_driver(9)tb_service_properties_changed(9)tb_xdomain_alloc(9)tb_xdomain_add(9)tb_xdomain_remove(9)tb_xdomain_unregister(9)tb_xdomain_lane_bonding_enable(9)tb_xdomain_lane_bonding_disable(9)tb_xdomain_alloc_in_hopid(9)tb_xdomain_alloc_out_hopid(9)tb_xdomain_release_in_hopid(9)tb_xdomain_release_out_hopid(9)tb_xdomain_enable_paths(9)tb_xdomain_disable_paths(9)tb_xdomain_find_by_uuid(9)tb_xdomain_find_by_route(9)tb_register_property_dir(9)tb_unregister_property_dir(9)
later bestie β this page lives in ./drivers/thunderbolt, dated October 2026, and it's filed under tb_xdomain_...y_link_depth(9) in the Kernel API Manual. 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