UID | title | description | old-location | tech.root | ms.date | keywords | ms.keywords | req.header | req.include-header | req.target-type | req.target-min-winverclnt | req.target-min-winversvr | req.kmdf-ver | req.umdf-ver | req.ddi-compliance | req.unicode-ansi | req.idl | req.max-support | req.namespace | req.assembly | req.type-library | req.lib | req.dll | req.irql | targetos | req.typenames | f1_keywords | topic_type | api_type | api_location | api_name | ||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
NF:rxworkq.RxDispatchToWorkerThread |
RxDispatchToWorkerThread function (rxworkq.h) |
RxDispatchToWorkerThread invokes a routine in the context of a worker thread. The memory for the WORK_QUEUE_ITEM is allocated by this routine. |
ifsk\rxdispatchtoworkerthread.htm |
ifsk |
04/16/2018 |
|
RxDispatchToWorkerThread, RxDispatchToWorkerThread routine [Installable File System Drivers], ifsk.rxdispatchtoworkerthread, rxref_4ac4f78d-fd07-4d80-a4db-8215322d6c89.xml, rxworkq/RxDispatchToWorkerThread |
rxworkq.h |
Rxworkq.h, Rxstruc.h, Ntifs.h |
Desktop |
<= APC_LEVEL |
Windows |
|
|
|
|
|
RxDispatchToWorkerThread invokes a routine in the context of a worker thread. The memory for the WORK_QUEUE_ITEM is allocated by this routine.
A pointer to the device object of the corresponding network mini-redirector driver.
The type of the work queue representing the priority of the task. The WorkQueueType parameter can be one of can be one of the following enumerations for WORK_QUEUE_TYPE:
Insert the WORK_QUEUE_ITEM into the queue from which a system thread with a real-time priority attribute will process the work item.
Insert the WORK_QUEUE_ITEM into the queue from which a system thread with a variable priority attribute will process the work item.
Insert the WORK_QUEUE_ITEM into the queue from which a system thread will process the work item so that the routine to be invoked is not blocked.
A pointer to the routine to be invoked.
A pointer to a context parameter associated with the work item to complete that is passed to the driver.
RxDispatchToWorkerThread returns STATUS_SUCCESS on success or one of the following error codes on failure:
Return code | Description |
---|---|
|
The item could not be dispatched. |
There are two common cases of dispatching operations to worker threads:
- For a very infrequent operation, space can be conserved by dynamically allocating and freeing memory for the work queue item when its is needed. The RxDispatchToWorkerThread routine would be used in this case
- When an operation is going to be repeatedly dispatched, time is conserved by allocating in advance the WORK_QUEUE_ITEM as part of the data structure to be dispatched and using this pre-allocated memory repeatedly. The RxPostToWorkerThread routine would be used in this case
The RxDispatchToWorkerThread invokes a routine in the context of a worker thread. The memory for the WORK_QUEUE_ITEM is allocated by the RxDispatchToWorkerThread routine from non-paged pool memory. Hence this routine can fail if insufficient resources are available.
The current implementation of the RxDispatchToWorkerThread routine queues work onto the same processor from which the call originated.
If the RxDispatchToWorkerThread routine fails on a debug build, the _RxLog routine is called with details of the error. If the RxDispatchToWorkerThread routine fails and WMI is enabled in the kernel, details of the error will be logged with WMI.