软中断处理机制

This commit is contained in:
fslongjin
2022-04-08 20:04:12 +08:00
parent d887f9a0f7
commit 9828aff985
12 changed files with 202 additions and 25 deletions

View 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);
}