KeInitializeQueue function (ntifs.h)
The KeInitializeQueue routine initializes a queue object on which threads can wait for entries.
Syntax
void KeInitializeQueue(
[out] PRKQUEUE Queue,
[in] ULONG Count
);
Parameters
[out] Queue
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 | Current number of threads waiting on the queue. |
MaximumCount | Maximum number of concurrent threads the queue can satisfy waits for. |
ThreadListHead | Pointer to the first entry in the thread list. |
[in] Count
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 IRP Queues.
Requirements
Requirement | Value |
---|---|
Target Platform | Universal |
Header | ntifs.h (include Ntifs.h) |
Library | NtosKrnl.lib |
DLL | NtosKrnl.exe |
IRQL | <= DISPATCH_LEVEL |