Expand Minimize

KsQueueWorkItem function

The KsQueueWorkItem function queues the specified work item with a worker previous created by the KsRegisterWorker function.

Syntax


NTSTATUS KsQueueWorkItem(
  _In_  PKSWORKER Worker,
  _In_  PWORK_QUEUE_ITEM WorkItem
);

Parameters

Worker [in]

Specifies the previously allocated worker.

WorkItem [in]

Specifies the initialized work item to queue. This work item is only associated with the worker as long as the worker is on a queue. The work item must have been initialized by IoAllocateWorkItem.

Return value

The KsQueueWorkItem function returns STATUS_SUCCESS if the work item was queued, or if unsuccessful the function returns an error when attempting to create a new worker if no threads are currently available.

Remarks

The worker can only be on a queue in one place, so subsequent queuing of the worker must wait until the work item has begun executing. This function may be called at DISPATCH_LEVEL.

Requirements

Header

Ks.h (include Ks.h)

Library

Ks.lib

 

 

Send comments about this topic to Microsoft

Show:
© 2014 Microsoft