include/linux/alarmtimer.h
Source file repositories/reference/linux-study-clean/include/linux/alarmtimer.h
File Facts
- System
- Linux kernel
- Corpus path
include/linux/alarmtimer.h- Extension
.h- Size
- 1902 bytes
- Lines
- 68
- 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/time.hlinux/hrtimer.hlinux/timerqueue.h
Detected Declarations
struct rtc_devicestruct alarmenum alarmtimer_typefunction alarm_get_expires
Annotated Snippet
struct alarm {
struct timerqueue_node node;
struct hrtimer timer;
void (*function)(struct alarm *, ktime_t now);
enum alarmtimer_type type;
int state;
void *data;
};
static __always_inline ktime_t alarm_get_expires(struct alarm *alarm)
{
return alarm->node.expires;
}
void alarm_init(struct alarm *alarm, enum alarmtimer_type type,
void (*function)(struct alarm *, ktime_t));
bool alarm_start_timer(struct alarm *alarm, ktime_t expires, bool relative);
int alarm_try_to_cancel(struct alarm *alarm);
int alarm_cancel(struct alarm *alarm);
u64 alarm_forward(struct alarm *alarm, ktime_t now, ktime_t interval);
u64 alarm_forward_now(struct alarm *alarm, ktime_t interval);
ktime_t alarm_expires_remaining(const struct alarm *alarm);
#ifdef CONFIG_RTC_CLASS
/* Provide way to access the rtc device being used by alarmtimers */
struct rtc_device *alarmtimer_get_rtcdev(void);
#else
static inline struct rtc_device *alarmtimer_get_rtcdev(void) { return NULL; }
#endif
#endif
Annotation
- Immediate include surface: `linux/time.h`, `linux/hrtimer.h`, `linux/timerqueue.h`.
- Detected declarations: `struct rtc_device`, `struct alarm`, `enum alarmtimer_type`, `function alarm_get_expires`.
- 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.