include/linux/rcupdate.h
Source file repositories/reference/linux-study-clean/include/linux/rcupdate.h
File Facts
- System
- Linux kernel
- Corpus path
include/linux/rcupdate.h- Extension
.h- Size
- 44102 bytes
- Lines
- 1187
- 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.
- Uses kernel synchronization; read lock ordering, sleepability, and interrupt context assumptions before translating.
- Allocates kernel memory; connect allocation flags and lifetime to context constraints.
- Defines or uses C structs; map object ownership, embedded links, reference counts, and lock ownership.
Dependency Surface
linux/types.hlinux/compiler.hlinux/atomic.hlinux/irqflags.hlinux/sched.hlinux/bottom_half.hlinux/lockdep.hlinux/cleanup.hasm/processor.hlinux/context_tracking_irq.hlinux/rcutree.hlinux/rcutiny.h
Detected Declarations
struct rcu_gp_oldstatefunction get_state_synchronize_rcufunction __rcu_read_lockfunction __rcu_read_unlockfunction rcu_preempt_depthfunction call_rcu_hurryfunction rcu_sysrq_startfunction rcu_irq_work_reschedfunction rcu_init_nohzfunction rcu_nocb_cpu_deoffloadfunction rcu_nocb_flush_deferred_wakeupfunction exit_tasks_rcu_startfunction rcu_softirq_qsfunction init_rcu_headfunction rcu_lockdep_current_cpu_onlinefunction rcu_lock_acquirefunction rcu_try_lock_acquirefunction rcu_lock_releasefunction rcu_read_lock_heldfunction rcu_read_lock_bh_heldfunction rcu_read_lock_sched_heldfunction rcu_read_lock_any_heldfunction debug_lockdep_rcu_enabledfunction rcu_preempt_sleep_checkfunction rcu_preempt_sleep_checkfunction lockdep_assert_rcu_helperfunction rcu_read_lockfunction rcu_write_lockfunction rcu_read_lock_bhfunction rcu_read_unlock_bhfunction rcu_read_lock_schedfunction rcu_read_lock_sched_notracefunction rcu_read_unlock_schedfunction rcu_read_unlock_sched_notracefunction rcu_read_lock_dont_migratefunction rcu_read_unlock_migratefunction rcu_head_after_call_rcufunction rcu_head_after_call_rcu
Annotated Snippet
static inline void rcu_sysrq_start(void) { }
static inline void rcu_sysrq_end(void) { }
#endif /* #else #ifdef CONFIG_RCU_STALL_COMMON */
#if defined(CONFIG_NO_HZ_FULL) && (!defined(CONFIG_GENERIC_ENTRY) || !defined(CONFIG_VIRT_XFER_TO_GUEST_WORK))
void rcu_irq_work_resched(void);
#else
static __always_inline void rcu_irq_work_resched(void) { }
#endif
#ifdef CONFIG_RCU_NOCB_CPU
void rcu_init_nohz(void);
int rcu_nocb_cpu_offload(int cpu);
int rcu_nocb_cpu_deoffload(int cpu);
void rcu_nocb_flush_deferred_wakeup(void);
#define RCU_NOCB_LOCKDEP_WARN(c, s) RCU_LOCKDEP_WARN(c, s)
#else /* #ifdef CONFIG_RCU_NOCB_CPU */
static inline void rcu_init_nohz(void) { }
static inline int rcu_nocb_cpu_offload(int cpu) { return -EINVAL; }
static inline int rcu_nocb_cpu_deoffload(int cpu) { return 0; }
static inline void rcu_nocb_flush_deferred_wakeup(void) { }
#define RCU_NOCB_LOCKDEP_WARN(c, s)
#endif /* #else #ifdef CONFIG_RCU_NOCB_CPU */
/*
* Note a quasi-voluntary context switch for RCU-tasks's benefit.
* This is a macro rather than an inline function to avoid #include hell.
*/
#ifdef CONFIG_TASKS_RCU_GENERIC
# ifdef CONFIG_TASKS_RCU
# define rcu_tasks_classic_qs(t, preempt) \
do { \
if (!(preempt) && READ_ONCE((t)->rcu_tasks_holdout)) \
WRITE_ONCE((t)->rcu_tasks_holdout, false); \
} while (0)
void call_rcu_tasks(struct rcu_head *head, rcu_callback_t func);
void synchronize_rcu_tasks(void);
void rcu_tasks_torture_stats_print(char *tt, char *tf);
# else
# define rcu_tasks_classic_qs(t, preempt) do { } while (0)
# define call_rcu_tasks call_rcu
# define synchronize_rcu_tasks synchronize_rcu
# endif
#define rcu_tasks_qs(t, preempt) rcu_tasks_classic_qs((t), (preempt))
# ifdef CONFIG_TASKS_RUDE_RCU
void synchronize_rcu_tasks_rude(void);
void rcu_tasks_rude_torture_stats_print(char *tt, char *tf);
# endif
#define rcu_note_voluntary_context_switch(t) rcu_tasks_qs(t, false)
void exit_tasks_rcu_start(void);
void exit_tasks_rcu_finish(void);
#else /* #ifdef CONFIG_TASKS_RCU_GENERIC */
#define rcu_tasks_classic_qs(t, preempt) do { } while (0)
#define rcu_tasks_qs(t, preempt) do { } while (0)
#define rcu_note_voluntary_context_switch(t) do { } while (0)
#define call_rcu_tasks call_rcu
#define synchronize_rcu_tasks synchronize_rcu
static inline void exit_tasks_rcu_start(void) { }
static inline void exit_tasks_rcu_finish(void) { }
#endif /* #else #ifdef CONFIG_TASKS_RCU_GENERIC */
/**
* cond_resched_tasks_rcu_qs - Report potential quiescent states to RCU
*
* This macro resembles cond_resched(), except that it is defined to
* report potential quiescent states to RCU-tasks even if the cond_resched()
* machinery were to be shut off, as some advocate for PREEMPTION kernels.
*/
#define cond_resched_tasks_rcu_qs() \
do { \
rcu_tasks_qs(current, false); \
cond_resched(); \
} while (0)
/**
* rcu_softirq_qs_periodic - Report RCU and RCU-Tasks quiescent states
* @old_ts: jiffies at start of processing.
*
* This helper is for long-running softirq handlers, such as NAPI threads in
* networking. The caller should initialize the variable passed in as @old_ts
* at the beginning of the softirq handler. When invoked frequently, this macro
Annotation
- Immediate include surface: `linux/types.h`, `linux/compiler.h`, `linux/atomic.h`, `linux/irqflags.h`, `linux/sched.h`, `linux/bottom_half.h`, `linux/lockdep.h`, `linux/cleanup.h`.
- Detected declarations: `struct rcu_gp_oldstate`, `function get_state_synchronize_rcu`, `function __rcu_read_lock`, `function __rcu_read_unlock`, `function rcu_preempt_depth`, `function call_rcu_hurry`, `function rcu_sysrq_start`, `function rcu_irq_work_resched`, `function rcu_init_nohz`, `function rcu_nocb_cpu_deoffload`.
- Atlas domain: Core OS / Core Kernel Interface.
- 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.