mirror of
https://github.com/DragonOS-Community/DragonOS.git
synced 2025-06-22 23:43:24 +00:00
bugfix: 当进程在内核态退出后,屏幕刷新软中断会一直保持在pending的状态的bug
This commit is contained in:
@ -1,5 +1,6 @@
|
||||
#include "HPET.h"
|
||||
#include <common/kprint.h>
|
||||
#include <common/compiler.h>
|
||||
#include <mm/mm.h>
|
||||
#include <driver/interrupt/apic/apic.h>
|
||||
#include <exception/softirq.h>
|
||||
@ -74,6 +75,12 @@ void HPET_handler(uint64_t number, uint64_t param, struct pt_regs *regs)
|
||||
if (timer_jiffies >= video_refresh_expire_jiffies || (video_last_refresh_pid != current_pcb->pid))
|
||||
{
|
||||
raise_softirq(VIDEO_REFRESH_SIRQ);
|
||||
// 超过130ms仍未刷新完成,则重新发起刷新(防止由于进程异常退出导致的屏幕无法刷新)
|
||||
if (unlikely(timer_jiffies >= (video_refresh_expire_jiffies + (1 << 17))))
|
||||
{
|
||||
video_refresh_expire_jiffies = timer_jiffies + (1 << 20);
|
||||
clear_softirq_pending(VIDEO_REFRESH_SIRQ);
|
||||
}
|
||||
}
|
||||
break;
|
||||
|
||||
|
Reference in New Issue
Block a user