include/linux/tick.h
Source file repositories/reference/linux-study-clean/include/linux/tick.h
File Facts
- System
- Linux kernel
- Corpus path
include/linux/tick.h- Extension
.h- Size
- 9724 bytes
- Lines
- 313
- 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.
- Defines or uses C structs; map object ownership, embedded links, reference counts, and lock ownership.
Dependency Surface
linux/clockchips.hlinux/irqflags.hlinux/percpu.hlinux/context_tracking_state.hlinux/cpumask.hlinux/sched.hlinux/rcupdate.hlinux/static_key.h
Detected Declarations
enum tick_broadcast_modeenum tick_broadcast_stateenum tick_dep_bitsfunction tick_initfunction tick_assert_timekeeping_handoverfunction tick_freezefunction tick_irq_enterfunction hotplug_cpu__broadcast_tick_pullfunction tick_broadcast_controlfunction tick_broadcast_oneshot_controlfunction tick_broadcast_enablefunction tick_broadcast_disablefunction tick_broadcast_forcefunction tick_broadcast_enterfunction tick_broadcast_exitfunction tick_nohz_is_activefunction tick_nohz_tick_stoppedfunction tick_nohz_tick_stopped_cpufunction tick_nohz_idle_stop_tickfunction tick_nohz_get_next_hrtimerfunction tick_nohz_get_sleep_lengthfunction tick_nohz_full_enabledfunction tick_dep_setfunction tick_dep_clearfunction tick_dep_set_cpufunction tick_dep_clear_cpufunction tick_dep_set_taskfunction tick_dep_clear_taskfunction tick_dep_init_taskfunction tick_dep_set_signalfunction tick_dep_clear_signalfunction tick_nohz_full_enabledfunction tick_nohz_full_cpufunction tick_nohz_dep_set_cpufunction tick_dep_setfunction tick_nohz_user_enter_prepare
Annotated Snippet
static inline void tick_init(void) { }
static inline void tick_suspend_local(void) { }
static inline void tick_resume_local(void) { }
#endif /* !CONFIG_GENERIC_CLOCKEVENTS */
#if defined(CONFIG_GENERIC_CLOCKEVENTS) && defined(CONFIG_HOTPLUG_CPU)
extern int tick_cpu_dying(unsigned int cpu);
extern void tick_assert_timekeeping_handover(void);
#else
#define tick_cpu_dying NULL
static inline void tick_assert_timekeeping_handover(void) { }
#endif
#if defined(CONFIG_GENERIC_CLOCKEVENTS) && defined(CONFIG_SUSPEND)
extern void tick_freeze(void);
extern void tick_unfreeze(void);
#else
static inline void tick_freeze(void) { }
static inline void tick_unfreeze(void) { }
#endif
#ifdef CONFIG_TICK_ONESHOT
extern void tick_irq_enter(void);
# ifndef arch_needs_cpu
# define arch_needs_cpu() (0)
# endif
# else
static inline void tick_irq_enter(void) { }
#endif
#if defined(CONFIG_GENERIC_CLOCKEVENTS_BROADCAST) && defined(CONFIG_TICK_ONESHOT)
extern void hotplug_cpu__broadcast_tick_pull(int dead_cpu);
#else
static inline void hotplug_cpu__broadcast_tick_pull(int dead_cpu) { }
#endif
enum tick_broadcast_mode {
TICK_BROADCAST_OFF,
TICK_BROADCAST_ON,
TICK_BROADCAST_FORCE,
};
enum tick_broadcast_state {
TICK_BROADCAST_EXIT,
TICK_BROADCAST_ENTER,
};
extern struct static_key_false arch_needs_tick_broadcast;
#ifdef CONFIG_GENERIC_CLOCKEVENTS_BROADCAST
extern void tick_broadcast_control(enum tick_broadcast_mode mode);
#else
static inline void tick_broadcast_control(enum tick_broadcast_mode mode) { }
#endif /* BROADCAST */
#ifdef CONFIG_GENERIC_CLOCKEVENTS
extern int tick_broadcast_oneshot_control(enum tick_broadcast_state state);
#else
static inline int tick_broadcast_oneshot_control(enum tick_broadcast_state state)
{
return 0;
}
#endif
static inline void tick_broadcast_enable(void)
{
tick_broadcast_control(TICK_BROADCAST_ON);
}
static inline void tick_broadcast_disable(void)
{
tick_broadcast_control(TICK_BROADCAST_OFF);
}
static inline void tick_broadcast_force(void)
{
tick_broadcast_control(TICK_BROADCAST_FORCE);
}
static inline int tick_broadcast_enter(void)
{
return tick_broadcast_oneshot_control(TICK_BROADCAST_ENTER);
}
static inline void tick_broadcast_exit(void)
{
tick_broadcast_oneshot_control(TICK_BROADCAST_EXIT);
}
enum tick_dep_bits {
TICK_DEP_BIT_POSIX_TIMER = 0,
TICK_DEP_BIT_PERF_EVENTS = 1,
TICK_DEP_BIT_SCHED = 2,
TICK_DEP_BIT_CLOCK_UNSTABLE = 3,
Annotation
- Immediate include surface: `linux/clockchips.h`, `linux/irqflags.h`, `linux/percpu.h`, `linux/context_tracking_state.h`, `linux/cpumask.h`, `linux/sched.h`, `linux/rcupdate.h`, `linux/static_key.h`.
- Detected declarations: `enum tick_broadcast_mode`, `enum tick_broadcast_state`, `enum tick_dep_bits`, `function tick_init`, `function tick_assert_timekeeping_handover`, `function tick_freeze`, `function tick_irq_enter`, `function hotplug_cpu__broadcast_tick_pull`, `function tick_broadcast_control`, `function tick_broadcast_oneshot_control`.
- 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.