微型端口驱动程序调用 NdisMSynchronizeWithInterruptEx 函数,以便将微型端口驱动程序提供的函数的执行与 MiniportInterrupt 函数同步。
语法
BOOLEAN NdisMSynchronizeWithInterruptEx(
[in] NDIS_HANDLE NdisInterruptHandle,
[in] ULONG MessageId,
[in] MINIPORT_SYNCHRONIZE_INTERRUPT_HANDLER SynchronizeFunction,
[in] PVOID SynchronizeFunction,
[in] PVOID SynchronizeContext
);
参数
[in] NdisInterruptHandle
在上一次调用中获取的微型端口驱动程序的中断句柄 NdisMRegisterInterruptEx 函数。
[in] MessageId
驱动程序必须与之同步的消息信号中断。 如果 NDIS 未为驱动程序授予消息信号中断,NDIS 将忽略此参数。 MessageId 是索引 IO_INTERRUPT_MESSAGE_INFO_ENTRY 结构 IO_INTERRUPT_MESSAGE_INFO 结构。 当驱动程序成功向 NdisMRegisterInterruptEx 函数注册 MSI 时,NDIS 会在 MessageInfoTable 成员处传递指向关联IO_INTERRUPT_MESSAGE_INFO结构的指针。
[in] SynchronizeFunction
驱动程序的入口点 MiniportSynchronizeInterrupt 函数。
[in] SynchronizeFunction
驱动程序的入口点 MiniportSynchronizeInterrupt 函数。
[in] SynchronizeContext
指向 SynchronizeContext 处传递给 MiniportSynchronizeInterrupt 函数的微型端口驱动程序确定的上下文区域的指针。
返回值
NdisMSynchronizeWithInterruptEx 返回 MiniportSynchronizeInterrupt 返回的布尔值。
言论
向 NdisMRegisterInterruptEx 注册中断的微型端口驱动程序 使用 NdisMSynchronizeWithInterruptEx。 值 MiniportSynchronizeInterrupt 函数返回也由 NdisMSynchronizeWithInterruptEx返回。 此传播的值向调用方提供状态。
与 DIRQL 上运行的任何其他驱动程序函数共享资源的任何微型端口驱动程序函数都必须使用 NdisMSynchronizeWithInterruptEx 来同步对这些资源的访问。 MiniportSynchronizeInterrupt 函数也在 DIRQL 上运行,共享资源受系统分配的旋转锁的保护。 因此,共享资源受到 MiniportInterrupt 函数和调用方同时访问的保护。
NdisMSynchronizeWithInterruptEx 释放系统旋转锁,并在调用方返回控件之前还原其原始 IRQL。
有关获取和释放 NDIS 旋转锁的详细信息,请参阅 网络驱动程序中的同步和通知。
要求
| 要求 | 价值 |
|---|---|
| 最低支持的客户端 | NDIS 6.0 及更高版本中受支持。 |
| 目标平台 | 普遍 |
| 标头 | ndis.h (包括 Ndis.h、Video.h) |
| 库 | Ndis.lib |
| IRQL | <= DIRQL |
| DDI 符合性规则 | NdisMDeregisterInterruptEx(ndis) |