kernel/rcu/rcu.h
Source file repositories/reference/linux-study-clean/kernel/rcu/rcu.h
File Facts
- System
- Linux kernel
- Corpus path
kernel/rcu/rcu.h- Extension
.h- Size
- 22463 bytes
- Lines
- 699
- Domain
- Core OS
- Bucket
- Scheduler, Processes, Timers, Sync, And Syscalls
- 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.
- Uses kernel synchronization; read lock ordering, sleepability, and interrupt context assumptions before translating.
- Defines or uses C structs; map object ownership, embedded links, reference counts, and lock ownership.
Dependency Surface
linux/slab.htrace/events/rcu.hlinux/rcu_node_tree.h
Detected Declarations
enum rcutorture_typefunction rcu_seq_snapfunction rcu_seq_snapfunction rcu_seq_set_statefunction rcu_seq_startfunction rcu_seq_endvalfunction rcu_seq_endfunction rcu_seq_snapfunction rcu_seq_currentfunction rcu_seq_snapfunction rcu_seq_snapfunction rcu_seq_snapfunction rcu_seq_completed_gpfunction rcu_seq_new_gpfunction rcu_seq_difffunction debug_rcu_head_queuefunction debug_rcu_head_unqueuefunction debug_rcu_head_queuefunction debug_rcu_head_unqueuefunction rcu_barrier_cb_is_donefunction rcu_stall_is_suppressed_at_bootfunction rcu_stall_is_suppressedfunction rcu_stall_is_suppressedfunction rcu_init_levelspreadfunction rcu_gp_is_normalfunction rcu_gp_is_expeditedfunction rcu_async_should_hurryfunction rcu_expedite_gpfunction show_rcu_tasks_gp_kthreadsfunction tasks_cblist_init_genericfunction rcu_get_jiffies_lazy_flushfunction rcu_set_jiffies_lazy_flushfunction rcutorture_get_gp_datafunction rcu_gp_set_torture_waitfunction srcutorture_get_gp_datafunction rcu_watching_zero_in_eqsfunction rcu_get_gp_seqfunction rcu_exp_batches_completedfunction rcu_force_quiescent_statefunction show_rcu_gp_kthreadsfunction rcu_fwd_progress_checkfunction srcu_batches_completedfunction rcu_bind_current_to_nocbfunction show_rcu_tasks_classic_gp_kthreadfunction show_rcu_tasks_rude_gp_kthreadfunction rcu_stall_notifier_call_chain
Annotated Snippet
static inline bool rcu_gp_is_normal(void) { return true; }
static inline bool rcu_gp_is_expedited(void) { return false; }
static inline bool rcu_async_should_hurry(void) { return false; }
static inline void rcu_expedite_gp(void) { }
static inline void rcu_unexpedite_gp(void) { }
static inline void rcu_async_hurry(void) { }
static inline void rcu_async_relax(void) { }
static inline bool rcu_cpu_online(int cpu) { return true; }
#else /* #ifdef CONFIG_TINY_RCU */
bool rcu_gp_is_normal(void); /* Internal RCU use. */
bool rcu_gp_is_expedited(void); /* Internal RCU use. */
bool rcu_async_should_hurry(void); /* Internal RCU use. */
void rcu_expedite_gp(void);
void rcu_unexpedite_gp(void);
void rcu_async_hurry(void);
void rcu_async_relax(void);
void rcupdate_announce_bootup_oddness(void);
bool rcu_cpu_online(int cpu);
#ifdef CONFIG_TASKS_RCU_GENERIC
void show_rcu_tasks_gp_kthreads(void);
#else /* #ifdef CONFIG_TASKS_RCU_GENERIC */
static inline void show_rcu_tasks_gp_kthreads(void) {}
#endif /* #else #ifdef CONFIG_TASKS_RCU_GENERIC */
#endif /* #else #ifdef CONFIG_TINY_RCU */
#ifdef CONFIG_TASKS_RCU
struct task_struct *get_rcu_tasks_gp_kthread(void);
void rcu_tasks_get_gp_data(int *flags, unsigned long *gp_seq);
#endif // # ifdef CONFIG_TASKS_RCU
#ifdef CONFIG_TASKS_RUDE_RCU
struct task_struct *get_rcu_tasks_rude_gp_kthread(void);
void rcu_tasks_rude_get_gp_data(int *flags, unsigned long *gp_seq);
#endif // # ifdef CONFIG_TASKS_RUDE_RCU
#ifdef CONFIG_TASKS_RCU_GENERIC
void tasks_cblist_init_generic(void);
#else /* #ifdef CONFIG_TASKS_RCU_GENERIC */
static inline void tasks_cblist_init_generic(void) { }
#endif /* #else #ifdef CONFIG_TASKS_RCU_GENERIC */
#define RCU_SCHEDULER_INACTIVE 0
#define RCU_SCHEDULER_INIT 1
#define RCU_SCHEDULER_RUNNING 2
enum rcutorture_type {
RCU_FLAVOR,
RCU_TASKS_FLAVOR,
RCU_TASKS_RUDE_FLAVOR,
RCU_TASKS_TRACING_FLAVOR,
RCU_TRIVIAL_FLAVOR,
SRCU_FLAVOR,
INVALID_RCU_FLAVOR
};
#if defined(CONFIG_RCU_LAZY)
unsigned long rcu_get_jiffies_lazy_flush(void);
void rcu_set_jiffies_lazy_flush(unsigned long j);
#else
static inline unsigned long rcu_get_jiffies_lazy_flush(void) { return 0; }
static inline void rcu_set_jiffies_lazy_flush(unsigned long j) { }
#endif
#if defined(CONFIG_TREE_RCU)
void rcutorture_get_gp_data(int *flags, unsigned long *gp_seq);
void do_trace_rcu_torture_read(const char *rcutorturename,
struct rcu_head *rhp,
unsigned long secs,
unsigned long c_old,
unsigned long c);
void rcu_gp_set_torture_wait(int duration);
void rcu_set_gpwrap_lag(unsigned long lag);
int rcu_get_gpwrap_count(int cpu);
#else
static inline void rcutorture_get_gp_data(int *flags, unsigned long *gp_seq)
{
*flags = 0;
*gp_seq = 0;
}
#ifdef CONFIG_RCU_TRACE
void do_trace_rcu_torture_read(const char *rcutorturename,
struct rcu_head *rhp,
unsigned long secs,
unsigned long c_old,
unsigned long c);
#else
#define do_trace_rcu_torture_read(rcutorturename, rhp, secs, c_old, c) \
do { } while (0)
#endif
static inline void rcu_gp_set_torture_wait(int duration) { }
Annotation
- Immediate include surface: `linux/slab.h`, `trace/events/rcu.h`, `linux/rcu_node_tree.h`.
- Detected declarations: `enum rcutorture_type`, `function rcu_seq_snap`, `function rcu_seq_snap`, `function rcu_seq_set_state`, `function rcu_seq_start`, `function rcu_seq_endval`, `function rcu_seq_end`, `function rcu_seq_snap`, `function rcu_seq_current`, `function rcu_seq_snap`.
- Atlas domain: Core OS / Scheduler, Processes, Timers, Sync, And Syscalls.
- Implementation status: source implementation candidate.
- Synchronization appears in or near this file; preserve lock ordering, sleepability, and interrupt-context constraints.
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.