阅读:910回复:1
虚拟中断
通过调用VPICD服务VPICD_Virtualize_IRQ来注册中断的和使用从VHardwareInt派生一个类虚拟中断有什么区别? :P
|
|
|
沙发#
发布于:2002-06-02 20:05
VHardwareInt use VPICD_Virtualize_IRQ
BOOL VHardwareInt::hook() { VID virqdesc; DWORD pFunc; VHardwareInt vhi; virqdesc.VID_Hw_Int_Proc = resolveOverride(&vhi,this,&VHardwareInt::OnHardwareInt); virqdesc.VID_Virt_Int_Proc = resolveOverride(&vhi,this,&VHardwareInt::OnVirtualInt); virqdesc.VID_EOI_Proc = resolveOverride(&vhi,this,&VHardwareInt::OnVirtualEOI); virqdesc.VID_Mask_Change_Proc = resolveOverride(&vhi,this,(VOID (VHardwareInt::*)(VMHANDLE))&VHardwareInt::OnVirtualMask); virqdesc.VID_IRET_Proc = resolveOverride(&vhi,this,&VHardwareInt::OnVirtualIRET); virqdesc.VID_IRET_Time_Out = m_timeout; virqdesc.VID_Options = m_flags; virqdesc.VID_IRQ_Number = m_irq; if (virqdesc.VID_Hw_Int_Proc == 0)// if no override for hw_int handler return FALSE; createHWIThunk(this, m_thunk, &virqdesc); m_handle = VPICD_Virtualize_IRQ((PVID) &virqdesc); if (m_handle == 0) { DEBUGEVENT(DBG_WARNING, \"Failed to virtualize hardware int\"); } return (m_handle != 0); } |
|