#include <wdm.h>
#include "cbm_driver.h"
Go to the source code of this file.
Functions | |
| VOID | QueueInit (PQUEUE Queue, PCBMDRIVER_STARTIO DriverStartIo) |
| Initialize a QUEUE object. | |
| NTSTATUS | QueueStartPacket (PQUEUE Queue, PIRP Irp, BOOLEAN FastStart, PDEVICE_OBJECT Fdo) |
| Insert an IRP into a QUEUE object. | |
| VOID | QueueStall (PQUEUE Queue) |
| Sets a QUEUE into stalled state. | |
| VOID | QueueUnstall (PQUEUE Queue) |
| Sets a QUEUE into unstalled state. | |
| NTSTATUS | QueueCompleteIrp (PQUEUE Queue, PIRP Irp, NTSTATUS NtStatus, ULONG_PTR Information) |
| Complete an IRP which is on a QUEUE. | |
| NTSTATUS | QueuePoll (PQUEUE Queue, PDEVICE_OBJECT Fdo) |
| Poll the QUEUE. | |
| NTSTATUS | QueueSignal (PQUEUE Queue) |
| Signal to the QUEUE need for processing. | |
| NTSTATUS | QueueCleanup (PQUEUE Queue, PFILE_OBJECT FileObject) |
| Process an IRP_MJ_CLEANUP on the QUEUE. | |
| BOOLEAN | QueueShouldCancelCurrentIrp (PQUEUE Queue) |
| Should the current IRP be cancelled? | |
**************************************************************
Definition in file queue.c.
|
||||||||||||
|
Process an IRP_MJ_CLEANUP on the QUEUE. Whenever an IRP_MJ_CLEANUP is received by the driver, it has to complete all IRPs that belong to the given file object. This function takes all appropriate IRPs out of the QUEUE and completes them.
Definition at line 999 of file queue.c. References FUNC_ENTER, QUEUE::IrpQueue, and QueueCompleteIrp(). Referenced by cbm_cleanup(). |
|
||||||||||||||||||||
|
Complete an IRP which is on a QUEUE. This function completes an IRP which is on a QUEUE object
Definition at line 757 of file queue.c. References QUEUE::CurrentIrp, DBG_ASSERT, FUNC_ENTER, and PERF_EVENT_COMPLETEIRP. Referenced by cbm_cleanup(), cbm_createopenclose(), cbm_devicecontrol(), cbm_execute_close(), cbm_execute_createopen(), cbm_execute_devicecontrol(), cbm_execute_readwrite(), cbm_readwrite(), QueueCleanup(), and QueueStartPacket(). |
|
||||||||||||
|
Initialize a QUEUE object. This function initializes a QUEUE object before it can be used by the other Queue...() functions.
Definition at line 389 of file queue.c. References QUEUE::DriverStartIo, FUNC_ENTER, FUNC_LEAVE, QUEUE::IrpListHead, QUEUE::IrpListSpinlock, QUEUE::IrpQueue, QUEUE::IsDropping, QUEUE::IsStalled, and QUEUE::NotEmptyEvent. Referenced by AddDeviceCommonInit(). |
|
||||||||||||
|
Poll the QUEUE. This function polls the QUEUE object. If there is an IRP in there, the IRP is executed by calling the specified DriverStartIo() function. If there is no IRP, this function just sleeps until there is one.
Definition at line 817 of file queue.c. References QUEUE::CurrentIrp, DBG_ASSERT, QUEUE::DriverStartIo, FUNC_ENTER, and QUEUE::NotEmptyEvent. Referenced by cbm_thread(). |
|
|
Should the current IRP be cancelled? Find out if the caller of the current IRP is not interested anymore in the result.
Definition at line 1042 of file queue.c. References QUEUE::CurrentIrp, FUNC_ENTER, and FUNC_LEAVE_BOOLEAN. Referenced by cbmiec_i_raw_read(), cbmiec_i_raw_write(), cbmiec_iec_wait(), and cbmiec_wait_for_listener(). |
|
|
Signal to the QUEUE need for processing. This function signals the QUEUE object that there is something to be processed. In general, this means that some IRP has been queued.
Definition at line 901 of file queue.c. References FUNC_ENTER, and QUEUE::NotEmptyEvent. Referenced by cbm_stop_thread(), and QueueStartPacket(). |
|
|
Sets a QUEUE into stalled state. This function unconditionally stalls the given QUEUE.
This function is needed for correct PnP management. As currently, we do not do any PnP, this function is unused currently. Definition at line 616 of file queue.c. References DBG_ASSERT, FUNC_ENTER, FUNC_LEAVE, and QUEUE::IsStalled. |
|
||||||||||||||||||||
|
Insert an IRP into a QUEUE object. This function inserts an IRP into the given QUEUE object.
The return value can be directly used in the dispatch function which calls QueueStartPacket() as the return status. Definition at line 468 of file queue.c. References QUEUE::CurrentIrp, DBG_ASSERT, QUEUE::DriverStartIo, QUEUE::DroppingReturnStatus, FUNC_ENTER, QUEUE::IrpQueue, QUEUE::IsDropping, QueueCompleteIrp(), and QueueSignal(). Referenced by cbm_createopenclose(), cbm_devicecontrol(), and cbm_readwrite(). |
|
|
Sets a QUEUE into unstalled state. This function unstalls the given QUEUE.
This function is needed for correct PnP management. As currently, we do not do any PnP, this function is unused currently. Definition at line 645 of file queue.c. References DBG_ASSERT, FUNC_ENTER, FUNC_LEAVE, and QUEUE::IsStalled. |
1.4.2