include/linux/btree-128.h
Source file repositories/reference/linux-study-clean/include/linux/btree-128.h
File Facts
- System
- Linux kernel
- Corpus path
include/linux/btree-128.h- Extension
.h- Size
- 2737 bytes
- Lines
- 111
- Domain
- Core OS
- Bucket
- Core Kernel Interface
- Inferred role
- Core OS: implementation source
- Status
- source implementation candidate
Why This File Exists
Core operating-system implementation surface: boot, tasks, memory, VFS, syscall-facing interfaces, synchronization, credentials, and isolation.
- Core operating-system implementation surface: boot, tasks, memory, VFS, syscall-facing interfaces, synchronization, credentials, and isolation.
- Defines or uses C structs; map object ownership, embedded links, reference counts, and lock ownership.
Dependency Surface
- No C-style include directives detected by the generator.
Detected Declarations
struct btree_head128function btree_init_mempool128function btree_init128function btree_destroy128function btree_insert128function btree_update128function btree_merge128function btree_visitor128function btree_grim_visitor128
Annotated Snippet
struct btree_head128 { struct btree_head h; };
static inline void btree_init_mempool128(struct btree_head128 *head,
mempool_t *mempool)
{
btree_init_mempool(&head->h, mempool);
}
static inline int btree_init128(struct btree_head128 *head)
{
return btree_init(&head->h);
}
static inline void btree_destroy128(struct btree_head128 *head)
{
btree_destroy(&head->h);
}
static inline void *btree_lookup128(struct btree_head128 *head, u64 k1, u64 k2)
{
u64 key[2] = {k1, k2};
return btree_lookup(&head->h, &btree_geo128, (unsigned long *)&key);
}
static inline void *btree_get_prev128(struct btree_head128 *head,
u64 *k1, u64 *k2)
{
u64 key[2] = {*k1, *k2};
void *val;
val = btree_get_prev(&head->h, &btree_geo128,
(unsigned long *)&key);
*k1 = key[0];
*k2 = key[1];
return val;
}
static inline int btree_insert128(struct btree_head128 *head, u64 k1, u64 k2,
void *val, gfp_t gfp)
{
u64 key[2] = {k1, k2};
return btree_insert(&head->h, &btree_geo128,
(unsigned long *)&key, val, gfp);
}
static inline int btree_update128(struct btree_head128 *head, u64 k1, u64 k2,
void *val)
{
u64 key[2] = {k1, k2};
return btree_update(&head->h, &btree_geo128,
(unsigned long *)&key, val);
}
static inline void *btree_remove128(struct btree_head128 *head, u64 k1, u64 k2)
{
u64 key[2] = {k1, k2};
return btree_remove(&head->h, &btree_geo128, (unsigned long *)&key);
}
static inline void *btree_last128(struct btree_head128 *head, u64 *k1, u64 *k2)
{
u64 key[2];
void *val;
val = btree_last(&head->h, &btree_geo128, (unsigned long *)&key[0]);
if (val) {
*k1 = key[0];
*k2 = key[1];
}
return val;
}
static inline int btree_merge128(struct btree_head128 *target,
struct btree_head128 *victim,
gfp_t gfp)
{
return btree_merge(&target->h, &victim->h, &btree_geo128, gfp);
}
void visitor128(void *elem, unsigned long opaque, unsigned long *__key,
size_t index, void *__func);
typedef void (*visitor128_t)(void *elem, unsigned long opaque,
u64 key1, u64 key2, size_t index);
static inline size_t btree_visitor128(struct btree_head128 *head,
unsigned long opaque,
visitor128_t func2)
{
Annotation
- Detected declarations: `struct btree_head128`, `function btree_init_mempool128`, `function btree_init128`, `function btree_destroy128`, `function btree_insert128`, `function btree_update128`, `function btree_merge128`, `function btree_visitor128`, `function btree_grim_visitor128`.
- Atlas domain: Core OS / Core Kernel Interface.
- Implementation status: source implementation candidate.
Implementation Notes
- This generated page is the file-by-file coverage layer; curated subsystem chapters should link here when they synthesize a multi-file control flow.
- Core OS pages should be promoted from atlas-only to deep-reviewed when they explain data structures, invariants, locking, lifecycle, and C implementation snippets.
- Driver-family pages are intentionally pattern-oriented unless they are part of the selected PCIe/NVMe representative device path.