mirror of
https://github.com/DragonOS-Community/DragonOS.git
synced 2025-06-19 17:26:31 +00:00
软中断处理机制
This commit is contained in:
14
kernel/driver/timers/timer.c
Normal file
14
kernel/driver/timers/timer.c
Normal file
@ -0,0 +1,14 @@
|
||||
#include "timer.h"
|
||||
#include<common/kprint.h>
|
||||
#include <exception/softirq.h>
|
||||
|
||||
void timer_init()
|
||||
{
|
||||
timer_jiffies = 0;
|
||||
register_softirq(0, &do_timer_softirq, NULL);
|
||||
}
|
||||
|
||||
void do_timer_softirq(void* data)
|
||||
{
|
||||
printk_color(ORANGE, BLACK, "(HPET%ld)", timer_jiffies);
|
||||
}
|
Reference in New Issue
Block a user