Drivers can queue I/O work item callback functions for later execution. NDIS calls the driver-specified callback function at IRQL = PASSIVE_LEVEL. This improves system performance by allowing the current function to return immediately and the driver to do work later at a lower IRQL.
NDIS 6.0 and later provide wrapper functions for the kernel I/O work item routines IoAllocateWorkItem, IoFreeWorkItem, and IoQueueWorkItem. Instead of the private IO_WORKITEM structure, NDIS uses the private NDIS_IO_WORKITEM structure.
NDIS 6.0 drivers call the NdisAllocateIoWorkItem function to allocate a work item. NDIS miniport drivers pass NdisAllocateIoWorkItem the adapter handle that NDIS passed to the MiniportInitializeEx function. NdisAllocateIoWorkItem gets the device object associated with the handle and passes the device object to the IoAllocateWorkItem routine. Filter drivers pass in a filter handle.
Note Protocol drivers cannot use NdisAllocateIoWorkItem because NDIS does not associate protocol drivers with device objects.
NDIS drivers call the NdisQueueIoWorkItem function to queue work items. NDIS work items use the CriticalWorkQueue queue type.