include/linux/rseq_types.h
Source file repositories/reference/linux-study-clean/include/linux/rseq_types.h
File Facts
- System
- Linux kernel
- Corpus path
include/linux/rseq_types.h- Extension
.h- Size
- 5657 bytes
- Lines
- 206
- 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/irq_work_types.hlinux/types.hlinux/workqueue_types.h
Detected Declarations
struct rseqstruct rseq_eventstruct rseq_idsstruct rseq_slicestruct rseq_datastruct rseq_datastruct sched_mm_cidstruct mm_cid_pcpustruct mm_mm_cidstruct mm_mm_cidstruct sched_mm_cid
Annotated Snippet
struct rseq_event {
union {
u64 all;
struct {
union {
u32 events;
struct {
u8 sched_switch;
u8 ids_changed;
u8 user_irq;
};
};
u8 has_rseq;
u8 __pad;
union {
u16 error;
struct {
u8 fatal;
u8 slowpath;
};
};
};
};
};
/**
* struct rseq_ids - Cache for ids, which need to be updated
* @cpu_cid: Compound of @cpu_id and @mm_cid to make the
* compiler emit a single compare on 64-bit
* @cpu_id: The CPU ID which was written last to user space
* @mm_cid: The MM CID which was written last to user space
* @node_id: The node ID which was written last to user space
*
* @cpu_id, @mm_cid and @node_id are updated when the data is written to user space.
*/
struct rseq_ids {
union {
u64 cpu_cid;
struct {
u32 cpu_id;
u32 mm_cid;
};
};
u32 node_id;
};
/**
* union rseq_slice_state - Status information for rseq time slice extension
* @state: Compound to access the overall state
* @enabled: Time slice extension is enabled for the task
* @granted: Time slice extension was granted to the task
*/
union rseq_slice_state {
u16 state;
struct {
u8 enabled;
u8 granted;
};
};
/**
* struct rseq_slice - Status information for rseq time slice extension
* @state: Time slice extension state
* @expires: The time when a grant expires
* @yielded: Indicator for rseq_slice_yield()
*/
struct rseq_slice {
union rseq_slice_state state;
u64 expires;
u8 yielded;
};
/**
* struct rseq_data - Storage for all rseq related data
* @usrptr: Pointer to the registered user space RSEQ memory
* @len: Length of the RSEQ region
* @sig: Signature of critical section abort IPs
* @event: Storage for event management
* @ids: Storage for cached CPU ID and MM CID
* @slice: Storage for time slice extension data
*/
struct rseq_data {
struct rseq __user *usrptr;
u32 len;
u32 sig;
struct rseq_event event;
struct rseq_ids ids;
#ifdef CONFIG_RSEQ_SLICE_EXTENSION
struct rseq_slice slice;
Annotation
- Immediate include surface: `linux/irq_work_types.h`, `linux/types.h`, `linux/workqueue_types.h`.
- Detected declarations: `struct rseq`, `struct rseq_event`, `struct rseq_ids`, `struct rseq_slice`, `struct rseq_data`, `struct rseq_data`, `struct sched_mm_cid`, `struct mm_cid_pcpu`, `struct mm_mm_cid`, `struct mm_mm_cid`.
- 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.