include/linux/simple_ring_buffer.h
Source file repositories/reference/linux-study-clean/include/linux/simple_ring_buffer.h
File Facts
- System
- Linux kernel
- Corpus path
include/linux/simple_ring_buffer.h- Extension
.h- Size
- 1918 bytes
- Lines
- 66
- 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
linux/list.hlinux/ring_buffer.hlinux/ring_buffer_types.hlinux/types.h
Detected Declarations
struct simple_buffer_pagestruct simple_rb_per_cpu
Annotated Snippet
struct simple_buffer_page {
struct list_head link;
struct buffer_data_page *page;
u64 entries;
u32 write;
u32 id;
};
struct simple_rb_per_cpu {
struct simple_buffer_page *tail_page;
struct simple_buffer_page *reader_page;
struct simple_buffer_page *head_page;
struct simple_buffer_page *bpages;
struct trace_buffer_meta *meta;
u32 nr_pages;
#define SIMPLE_RB_UNAVAILABLE 0
#define SIMPLE_RB_READY 1
#define SIMPLE_RB_WRITING 2
u32 status;
u64 last_overrun;
u64 write_stamp;
struct simple_rb_cbs *cbs;
};
int simple_ring_buffer_init(struct simple_rb_per_cpu *cpu_buffer, struct simple_buffer_page *bpages,
const struct ring_buffer_desc *desc);
void simple_ring_buffer_unload(struct simple_rb_per_cpu *cpu_buffer);
void *simple_ring_buffer_reserve(struct simple_rb_per_cpu *cpu_buffer, unsigned long length,
u64 timestamp);
void simple_ring_buffer_commit(struct simple_rb_per_cpu *cpu_buffer);
int simple_ring_buffer_enable_tracing(struct simple_rb_per_cpu *cpu_buffer, bool enable);
int simple_ring_buffer_reset(struct simple_rb_per_cpu *cpu_buffer);
int simple_ring_buffer_swap_reader_page(struct simple_rb_per_cpu *cpu_buffer);
int simple_ring_buffer_init_mm(struct simple_rb_per_cpu *cpu_buffer,
struct simple_buffer_page *bpages,
const struct ring_buffer_desc *desc,
void *(*load_page)(unsigned long va),
void (*unload_page)(void *va));
void simple_ring_buffer_unload_mm(struct simple_rb_per_cpu *cpu_buffer,
void (*unload_page)(void *));
#endif
Annotation
- Immediate include surface: `linux/list.h`, `linux/ring_buffer.h`, `linux/ring_buffer_types.h`, `linux/types.h`.
- Detected declarations: `struct simple_buffer_page`, `struct simple_rb_per_cpu`.
- 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.