mirror of
https://github.com/DragonOS-Community/DragonOS.git
synced 2025-06-20 14:16:33 +00:00
🔧 将软中断更改为不可重入
This commit is contained in:
@ -66,7 +66,7 @@ void HPET_handler(uint64_t number, uint64_t param, struct pt_regs *regs)
|
||||
|
||||
// 若当前时间比定时任务的时间间隔大,则进入中断下半部
|
||||
if (container_of(list_next(&timer_func_head.list), struct timer_func_list_t, list)->expire_jiffies <= timer_jiffies)
|
||||
set_softirq_status((1 << TIMER_SIRQ));
|
||||
raise_softirq((1 << TIMER_SIRQ));
|
||||
|
||||
// if (current_pcb->pid == 2)
|
||||
// kwarn("timer_jiffies = %ld video_refresh_expire_jiffies=%ld", timer_jiffies, video_refresh_expire_jiffies);
|
||||
|
@ -27,22 +27,19 @@ void timer_init()
|
||||
|
||||
void do_timer_softirq(void *data)
|
||||
{
|
||||
// if(current_pcb->pid==3)
|
||||
// kdebug("pid3 timer irq");
|
||||
|
||||
struct timer_func_list_t *tmp = container_of(list_next(&timer_func_head.list), struct timer_func_list_t, list);
|
||||
|
||||
while ((!list_empty(&timer_func_head.list)) && (tmp->expire_jiffies <= timer_jiffies))
|
||||
{
|
||||
if (current_pcb->pid == 2)
|
||||
kdebug("pid2 timer do");
|
||||
|
||||
timer_func_del(tmp);
|
||||
tmp->func(tmp->data);
|
||||
kfree(tmp);
|
||||
tmp = container_of(list_next(&timer_func_head.list), struct timer_func_list_t, list);
|
||||
}
|
||||
|
||||
softirq_ack(TIMER_SIRQ);
|
||||
// printk_color(ORANGE, BLACK, "(HPET%ld)", timer_jiffies);
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
|
Reference in New Issue
Block a user