include/linux/linear_range.h
Source file repositories/reference/linux-study-clean/include/linux/linear_range.h
File Facts
- System
- Linux kernel
- Corpus path
include/linux/linear_range.h- Extension
.h- Size
- 2212 bytes
- Lines
- 65
- 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/types.h
Detected Declarations
struct linear_range
Annotated Snippet
struct linear_range {
unsigned int min;
unsigned int min_sel;
unsigned int max_sel;
unsigned int step;
};
#define LINEAR_RANGE(_min, _min_sel, _max_sel, _step) \
{ \
.min = _min, \
.min_sel = _min_sel, \
.max_sel = _max_sel, \
.step = _step, \
}
#define LINEAR_RANGE_IDX(_idx, _min, _min_sel, _max_sel, _step) \
[_idx] = LINEAR_RANGE(_min, _min_sel, _max_sel, _step)
unsigned int linear_range_values_in_range(const struct linear_range *r);
unsigned int linear_range_values_in_range_array(const struct linear_range *r,
int ranges);
unsigned int linear_range_get_max_value(const struct linear_range *r);
int linear_range_get_value(const struct linear_range *r, unsigned int selector,
unsigned int *val);
int linear_range_get_value_array(const struct linear_range *r, int ranges,
unsigned int selector, unsigned int *val);
int linear_range_get_selector_low(const struct linear_range *r,
unsigned int val, unsigned int *selector,
bool *found);
int linear_range_get_selector_high(const struct linear_range *r,
unsigned int val, unsigned int *selector,
bool *found);
void linear_range_get_selector_within(const struct linear_range *r,
unsigned int val, unsigned int *selector);
int linear_range_get_selector_low_array(const struct linear_range *r,
int ranges, unsigned int val,
unsigned int *selector, bool *found);
int linear_range_get_selector_high_array(const struct linear_range *r,
int ranges, unsigned int val,
unsigned int *selector, bool *found);
#endif
Annotation
- Immediate include surface: `linux/types.h`.
- Detected declarations: `struct linear_range`.
- 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.