KeInitializeQueue routine
The KeInitializeQueue routine initializes a queue object on which threads can wait for entries.
Syntax
VOID KeInitializeQueue( _Out_ PRKQUEUE Queue, _In_ ULONG Count );
Parameters
- Queue [out]
-
Pointer to a KQUEUE structure for which the caller must provide resident storage in nonpaged pool. This structure is defined as follows:
typedef struct _KQUEUE { DISPATCHER_HEADER Header; LIST_ENTRY EntryListHead; ULONG CurrentCount; ULONG MaximumCount; LIST_ENTRY ThreadListHead; } KQUEUE, *PKQUEUE, *RESTRICTED_POINTER PRKQUEUE;Member Meaning Header
Queue header
EntryListHead
Pointer to the first entry in the queue
CurrentCount
Number of entries in the queue
MaximumCount
Maximum number of entries the queue can contain
ThreadListHead
Pointer to the first entry in the thread list
- Count [in]
-
The maximum number of threads for which the waits on the queue object can be satisfied concurrently. If this parameter is not supplied, the number of processors in the machine is used.
Return value
None
Remarks
Usually the caller of KeInitializeQueue also creates a set of dedicated threads to queue and dequeue its entries. Such a caller can specify an explicit Count to prevent too many of its dedicated threads from waiting concurrently on its queue object.
KeInitializeQueue sets the queue object's initial signal state to Not Signaled.
For more information about using driver-managed internal queues, see Driver-Managed Queues.
Requirements
|
Header |
|
|---|---|
|
Library |
|
|
IRQL | <= DISPATCH_LEVEL |
See also
- ExAllocatePoolWithTag
- IoAllocateWorkItem
- IoQueueWorkItem
- KeInsertQueue
- KeRemoveQueue
- KeRundownQueue
- PsCreateSystemThread
Send comments about this topic to Microsoft
Build date: 11/21/2012