kernel/time/tick-legacy.c
Source file repositories/reference/linux-study-clean/kernel/time/tick-legacy.c
File Facts
- System
- Linux kernel
- Corpus path
kernel/time/tick-legacy.c- Extension
.c- Size
- 999 bytes
- Lines
- 38
- 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.
Dependency Surface
linux/irq.hlinux/profile.hlinux/timekeeper_internal.htick-internal.h
Detected Declarations
function legacy_timer_tick
Annotated Snippet
// SPDX-License-Identifier: GPL-2.0
/*
* Timer tick function for architectures that lack generic clockevents,
* consolidated here from m68k/ia64/parisc/arm.
*/
#include <linux/irq.h>
#include <linux/profile.h>
#include <linux/timekeeper_internal.h>
#include "tick-internal.h"
/**
* legacy_timer_tick() - advances the timekeeping infrastructure
* @ticks: number of ticks, that have elapsed since the last call.
*
* This is used by platforms that have not been converted to
* generic clockevents.
*
* If 'ticks' is zero, the CPU is not handling timekeeping, so
* only perform process accounting and profiling.
*
* Must be called with interrupts disabled.
*/
void legacy_timer_tick(unsigned long ticks)
{
if (ticks) {
raw_spin_lock(&jiffies_lock);
write_seqcount_begin(&jiffies_seq);
do_timer(ticks);
write_seqcount_end(&jiffies_seq);
raw_spin_unlock(&jiffies_lock);
update_wall_time();
}
update_process_times(user_mode(get_irq_regs()));
profile_tick(CPU_PROFILING);
}
Annotation
- Immediate include surface: `linux/irq.h`, `linux/profile.h`, `linux/timekeeper_internal.h`, `tick-internal.h`.
- Detected declarations: `function legacy_timer_tick`.
- 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.