DXGKDDI_INTERRUPT_ROUTINE回调函数 (dispmprt.h)

DxgkDdiInterruptRoutine 函数处理显示适配器生成的中断。

语法

DXGKDDI_INTERRUPT_ROUTINE DxgkddiInterruptRoutine;

BOOLEAN DxgkddiInterruptRoutine(
  [in] IN_CONST_PVOID MiniportDeviceContext,
  [in] IN_ULONG MessageNumber
)
{...}

参数

[in] MiniportDeviceContext

与显示适配器关联的上下文块的句柄。 显示微型端口驱动程序的 DxgkDdiAddDevice 函数以前将此句柄提供给 DirectX 图形内核子系统。

[in] MessageNumber

如果 中断是消息信号,则消息信号中断 中的从零开始的索引 (MSI) 表中。 对于基于行的中断,此参数为零。

返回值

如果 DxgkDdiInterruptRoutine 确定 MiniportDeviceContext 表示的适配器未生成中断,则返回 FALSE。 否则,它必须在适配器返回 TRUE 之前消除适配器上的中断。

注解

如果中断是基于行的 (MessageNumber = 0) , 则 DxgkDdiInterruptRoutine 必须确定 MiniportDeviceContext 表示的适配器是否生成了中断,否则将立即返回 FALSE。

如果 MiniportDeviceContext 表示的适配器确实生成了中断,则 DxgkDdiInterruptRoutine 应执行以下步骤:

  • 消除适配器上的中断。
  • 完成导致中断的请求操作,或将稍后完成操作的 DPC 排队。
  • 尽快返回 TRUE。

例如,共享内存 (的任何其他显示微型端口驱动程序函数,使用 DxgkDdiInterruptRoutine 表示的 MiniportDeviceContext) 状态的某些部分必须调用 DxgkCbSynchronizeExecution 以同步其对共享内存的访问。

DxgkDdiInterruptRoutine 函数可以调用 DxgkCbQueueDpcDxgkCbNotifyInterrupt,但不得调用任何其他 DxgkCbXxx 函数。 有关函数调用的正确序列的详细信息,请参阅 提交命令缓冲区

DxgkDdiInterruptRoutine 在提升的 IRQL 上运行,因此它 (并且它) 调用的所有函数都必须不可分页。 此外, DxgkDdiInterruptRoutine (和它) 调用的所有函数不得尝试访问可分页内存。

要求

要求
最低受支持的客户端 Windows Vista
目标平台 桌面
标头 dispmprt.h
IRQL 请参见“备注”部分。

另请参阅

DxgkCbNotifyInterrupt

DxgkCbQueueDpc

DxgkCbSynchronizeExecution