mirror of
https://github.com/subhobhai943/SUB-OS.git
synced 2026-10-25 16:52:29 +00:00
25 lines
532 B
C
25 lines
532 B
C
#ifndef _KERNEL_TIMER_H
|
|
#define _KERNEL_TIMER_H
|
|
|
|
#include <stdint.h>
|
|
#include <stddef.h>
|
|
#include <stdbool.h>
|
|
|
|
typedef void (*timer_callback_t)(uint64_t data);
|
|
|
|
typedef struct timer_list {
|
|
uint64_t expires;
|
|
timer_callback_t function;
|
|
uint64_t data;
|
|
bool active;
|
|
struct timer_list* next;
|
|
} timer_list_t;
|
|
|
|
void timer_wheel_init(void);
|
|
void timer_add(timer_list_t* timer);
|
|
void timer_mod(timer_list_t* timer, uint64_t expires);
|
|
void timer_del(timer_list_t* timer);
|
|
void timer_tick(void);
|
|
|
|
#endif // _KERNEL_TIMER_H
|