55 #ifdef USE_FAST_START_THREAD
59 KEVENT BackSignalEvent;
61 #endif // #ifdef USE_FAST_START_THREAD
93 #define QueueIsStalled(_Queue_) (_Queue_->IsStalled ? 1 : 0)
96 #define QueueIsDropping(_Queue_) (_Queue_->IsDropping ? 1 : 0)
104 QueueCompleteIrp(PQUEUE Queue, PIRP Irp, NTSTATUS StatusCode, ULONG_PTR Information);
107 QueueStartPacket(PQUEUE Queue, PIRP Irp, BOOLEAN FastStart, PDEVICE_OBJECT Fdo);
110 QueuePoll(PQUEUE Queue, PDEVICE_OBJECT Fdo);
VOID QueueInit(PQUEUE Queue, PCBMDRIVER_STARTIO DriverStartIo)
Initialize a QUEUE object.
KEVENT NotEmptyEvent
signal that the queue is not empty
NTSTATUS(* PCBMDRIVER_STARTIO)(IN PDEVICE_OBJECT DeviceObject, IN PIRP Irp)
NTSTATUS QueueStartPacket(PQUEUE Queue, PIRP Irp, BOOLEAN FastStart, PDEVICE_OBJECT Fdo)
Insert an IRP into a QUEUE object.
BOOLEAN QueueShouldCancelCurrentIrp(PQUEUE Queue)
Should the current IRP be cancelled?
A QUEUE object A QUEUE object is an object which can be used to queue IRPs for processing. This QUEUE object is optimized for being polled from an own worker thread. Anyway, a concept called FastStart is also implemented, which allows some IRPs to be completed immediately, without being queued, if no IRP is executed yet and the caller has stated that he wants this IRP to be started fast if possible.
NTSTATUS QueuePoll(PQUEUE Queue, PDEVICE_OBJECT Fdo)
Poll the QUEUE.
LIST_ENTRY IrpListHead
the list head for the IRP list
KSPIN_LOCK IrpListSpinlock
the spin lock to protect the IRP list
NTSTATUS QueueSignal(PQUEUE Queue)
Signal to the QUEUE need for processing.
PIRP CurrentIrp
Pointer to the IRP which is currently processed.
PCBMDRIVER_STARTIO DriverStartIo
pointer to the StartIo function to be called
LONG IsStalled
counter; if != 0, this queue is stalled, that is, no entries are dequeued.
IO_CSQ IrpQueue
the structure for the cancel-safe queue
LONG IsDropping
counter; if != 0, this queue is dropping, that is, no new entries are queued into the queue; instead...
NTSTATUS QueueCompleteIrp(PQUEUE Queue, PIRP Irp, NTSTATUS StatusCode, ULONG_PTR Information)
Complete an IRP which is on a QUEUE.
NTSTATUS QueueCleanup(PQUEUE Queue, PFILE_OBJECT FileObject)
Process an IRP_MJ_CLEANUP on the QUEUE.
struct QUEUE QUEUE
A QUEUE object A QUEUE object is an object which can be used to queue IRPs for processing. This QUEUE object is optimized for being polled from an own worker thread. Anyway, a concept called FastStart is also implemented, which allows some IRPs to be completed immediately, without being queued, if no IRP is executed yet and the caller has stated that he wants this IRP to be started fast if possible.
NTSTATUS DroppingReturnStatus
The NTSTATUS return code with which the IRP are completed if we are dropping IRPs.