PatchworkOS
Loading...
Searching...
No Matches
timer_ctx_t Struct Reference

Per-CPU system time context. More...

#include <timer.h>

Data Fields

uint64_t apicTicksPerNs
 The amount of ticks in the owner cpus apic timer that occur every nanosecond, stored using fixed point arithmetic, see apic_timer_ticks_per_ns() for more info.
 
clock_t nextDeadline
 The next time the owner cpus apic timer will fire, specified in nanoseconds since boot, used in timer_one_shot().
 
timer_callback_t callbacks [TIMER_MAX_CALLBACK]
 The registered timer callbacks for the owner cpu.
 
lock_t lock
 

Detailed Description

Per-CPU system time context.

Definition at line 34 of file timer.h.

Field Documentation

◆ apicTicksPerNs

uint64_t timer_ctx_t::apicTicksPerNs

The amount of ticks in the owner cpus apic timer that occur every nanosecond, stored using fixed point arithmetic, see apic_timer_ticks_per_ns() for more info.

Definition at line 40 of file timer.h.

Referenced by timer_ctx_init(), and timer_one_shot().

◆ callbacks

timer_callback_t timer_ctx_t::callbacks[TIMER_MAX_CALLBACK]

The registered timer callbacks for the owner cpu.

Definition at line 49 of file timer.h.

Referenced by timer_ctx_init(), timer_interrupt_handler(), timer_subscribe(), and timer_unsubscribe().

◆ lock

lock_t timer_ctx_t::lock

◆ nextDeadline

clock_t timer_ctx_t::nextDeadline

The next time the owner cpus apic timer will fire, specified in nanoseconds since boot, used in timer_one_shot().

Definition at line 45 of file timer.h.

Referenced by timer_ctx_init(), timer_interrupt_handler(), and timer_one_shot().


The documentation for this struct was generated from the following file: