Share via


NdisQueueIoWorkItem (Compact 7)

3/12/2014

NDIS drivers call this function to queue a work item.

Syntax

VOID
  NdisQueueIoWorkItem(
    IN NDIS_HANDLE  NdisIoWorkItemHandle,
    IN NDIS_IO_WORKITEM_ROUTINE  Routine,
    IN PVOID  WorkItemContext
    );

Parameters

  • NdisIoWorkItemHandle
    A handle to a private IO_WORKITEM structure that was returned by a previous call to the NdisAllocateIoWorkItem function.
  • Routine
    The entry point to the routine that NDIS calls to process the work item. NDIS calls this routine in the context of a system thread. This routine is declared as follows.

    VOID
      (*NDIS_IO_WORKITEM_ROUTINE)(
        IN PVOID  WorkItemContext,
        IN NDIS_HANDLE  NdisIoWorkItemHandle
        );
    

    The routine includes the following input parameters:

    • WorkItemContext
      A pointer to the context area that the driver passed to the WorkItemContext parameter of NdisQueueIoWorkItem.
    • NdisIoWorkItemHandle
      A handle to a private NDIS_IO_WORKITEM structure that was returned by a previous call to the NdisAllocateIoWorkItem function.
  • WorkItemContext
    A pointer to a caller-supplied context area that NDIS passes through to the callback routine. WorkItemContext can be any caller-specified data that the driver requires to manage the work item.

Return Value

None

Remarks

NdisQueueIoWorkItem calls IoQueueWorkItem to queue a work item. NDIS work items use the CriticalWorkQueue queue type.

The callback routine runs in a system thread context at IRQL = PASSIVE_LEVEL. This caller-supplied routine must call the NdisFreeIoWorkItem function to reclaim the storage allocated for the work item.

Requirements

Header

ndis.h

See Also

Reference

NDIS I/O Work Item Functions
NdisAllocateIoWorkItem
NdisFreeIoWorkItem