1.7 Driver-managed Queues

KeInitializeSpinLock

Initializes a variable of type KSPIN_LOCK. An initialized spin lock is a required parameter to the Ex..InterlockedList routines.

InitializeListHead

Sets up a queue header for a driver's internal queue, given a pointer to driver-supplied storage for the queue header and queue. An initialized queue header is a required parameter to the ExInterlockedInsert/Remove..List routines.

ExInterlockedInsertTailList

Inserts an entry at the tail of a doubly linked list, using a spin lock to ensure multiprocessor-safe access to the list and atomic modification of the list links.

ExInterlockedInsertHeadList

Inserts an entry at the head of a doubly linked list, using a spin lock to ensure multiprocessor-safe access to the list and atomic modification of the list links.

ExInterlockedRemoveHeadList

Removes an entry from the head of a doubly linked list, using a spin lock to ensure multiprocessor-safe access to the list and atomic modification of the list links.

ExInterlockedPopEntryList

Removes an entry from the head of a singly linked list as an atomic operation, using a spin lock to ensure multiprocessor-safe access to the list.

ExInterlockedPushEntryList

Inserts an entry at the head of a singly linked list as an atomic operation, using a spin lock to ensure multiprocessor-safe access to the list.

IsListEmpty

Returns whether a queue is empty, given its initialized list head. (This type of doubly linked list is not protected by a spin lock, unless the caller explicitly manages synchronization to queued entries with an initialized spin lock for which the caller supplies the storage.)

InsertTailList

Queues an entry at the end of the list.

InsertHeadList

Queues an entry at the head of the list.

RemoveHeadList

Dequeues an entry at the head of the list.

RemoveTailList

Dequeues an entry at the end of the list.

RemoveEntryList

Returns whether a given entry is in the given list and dequeues the entry if it is.

PushEntryList

Inserts an entry into the queue. (This type of singly linked list is not protected by a spin lock, unless the caller explicitly manages synchronization to queued entries with an initialized spin lock for which the caller supplies the storage.)

PopEntryList

Removes an entry from the queue.

KeInitializeDeviceQueue

Initializes a device queue object to a not-busy state, setting up an associated spin lock for multiprocessor-safe access to device queue entries.

KeInsertDeviceQueue

Acquires the device queue spin lock and queues an entry to a device driver if the device queue is not empty; otherwise, inserts the entry at the tail of the device queue.

KeInsertByKeyDeviceQueue

Acquires the device queue spin lock and queues an entry to a device driver if the device queue is not empty; otherwise, inserts the entry into the queue according to the given sort-key value.

KeRemoveDeviceQueue

Removes an entry from the head of a given device queue.

KeRemoveByKeyDeviceQueue

Removes an entry, selected according to the specified sort-key value, from the given device queue.

KeRemoveEntryDeviceQueue

Determines whether a given entry is in the given device queue and, if so, dequeues the entry.