STRUCT LOCK_CHAIN(9)
β¨ struct lock_chain(9) β¨
okay bestie, welcome to the Kernel API Manual, section 9 π today's main character is struct lock_chain, which is literally the lock dependency chain record. yes, it's giving very serious kernel business. no cap.
πΈ NAME πΈ
struct lock_chain β the lock dependency chain record π
π¦ SYNOPSIS π¦
ok so here's the whole vibe, exactly as it is:
struct lock_chain {
unsigned int irq_context : 2, depth : 6,
base : 24;
struct hlist_node entry;
u64 chain_key;
};
look at her. she's got bitfields and a hash key. obsessed. π₯
π Members π
one by one, bestie, we're going through the whole cast:
irq_contextβ this one is exactly the same asirq_contextinheld_lock(you know, the one below). same energy, same meaning, no notes πdepthβ the number of held locks in this chain. how deep does it go? this many. periodt.baseβ the index inchain_hlocksfor this chain. like, its home address in that array πentryβ the collided lock chains in thelock_chainhash list. yes, collision handling. we love a data structure that plays well with others π«Άchain_keyβ the hash key of thislock_chain. the actual key. iconic. π
π§ SEE ALSO π§
go check out the kernel file ./include/linux/lockdep.h β also lockdep_set_novalidate_class(9) and lockdep_set_notrack_class(9). iykyk π
β¨ a little reminder from your girl: keep every one of these fields exactly as they are, bitfield widths and all. this is kernel code, bestie, we do not freestyle here π
and that's the whole page, fr fr ππβ¨
kisses from the ./include/linux directory β dated October 2026 π this manual page is for struct lock_chain(9) and it's a whole mood. go forth and lock safely, bestie. π¦π
πΈ
π¦ 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