PatchworkOS  da8a090
A non-POSIX operating system.
Loading...
Searching...
No Matches
timer.h File Reference
#include <kernel/cpu/interrupt.h>
#include <kernel/cpu/irq.h>
#include <kernel/sync/lock.h>
#include <sys/proc.h>
#include <time.h>
Include dependency graph for timer.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Data Structures

struct  timer_cpu_ctx_t
 Per-CPU system time context. More...
 
struct  timer_source_t
 Timer source structure. More...
 

Macros

#define TIMER_MAX_SOURCES   4
 Maximum amount of timer sources.
 

Typedefs

typedef struct cpu cpu_t
 

Functions

void timer_cpu_ctx_init (timer_cpu_ctx_t *ctx)
 Initialize per-CPU timer context.
 
void timer_ack_eoi (interrupt_frame_t *frame, cpu_t *self)
 Acknowledge a timer interrupt and send EOI.
 
uint64_t timer_source_register (const timer_source_t *source)
 Register a timer source.
 
void timer_source_unregister (const timer_source_t *source)
 Unregister a timer source.
 
uint64_t timer_source_amount (void)
 Get the amount of registered timer sources.
 
void timer_set (clock_t uptime, clock_t deadline)
 Schedule a one-shot timer interrupt on the current CPU.
 

Typedef Documentation

◆ cpu_t

typedef struct cpu cpu_t

Definition at line 10 of file timer.h.