ReactOS  0.4.15-dev-4922-ge8ccc85
irpstream.cpp File Reference
#include "private.hpp"
#include <debug.h>
Include dependency graph for irpstream.cpp:

Go to the source code of this file.

Classes

class  CIrpQueue
 
struct  KSSTREAM_TAG
 
struct  KSSTREAM_DATA
 

Macros

#define NDEBUG
 
#define STREAM_DATA_OFFSET   (0)
 

Typedefs

typedef struct KSSTREAM_TAGPKSSTREAM_TAG
 
typedef struct KSSTREAM_DATAPKSSTREAM_DATA
 

Functions

static PIRP RemoveHeadList_IRP (IN OUT PLIST_ENTRY QueueHead)
 
NTSTATUS NTAPI NewIrpQueue (IN IIrpQueue **Queue)
 

Macro Definition Documentation

◆ NDEBUG

#define NDEBUG

Definition at line 12 of file irpstream.cpp.

◆ STREAM_DATA_OFFSET

#define STREAM_DATA_OFFSET   (0)

Definition at line 87 of file irpstream.cpp.

Typedef Documentation

◆ PKSSTREAM_DATA

◆ PKSSTREAM_TAG

Function Documentation

◆ NewIrpQueue()

NTSTATUS NTAPI NewIrpQueue ( IN IIrpQueue **  Queue)

Definition at line 869 of file irpstream.cpp.

871 {
873  if (!This)
875 
876  This->AddRef();
877 
878  *Queue = (IIrpQueue*)This;
879  return STATUS_SUCCESS;
880 }
#define STATUS_INSUFFICIENT_RESOURCES
Definition: udferr_usr.h:158
_Must_inspect_result_ _In_ WDFDEVICE _In_ PIRP _In_ WDFQUEUE Queue
Definition: wdfdevice.h:2221
#define TAG_PORTCLASS
Definition: private.hpp:24
#define NULL
Definition: types.h:112
#define STATUS_SUCCESS
Definition: shellext.h:65

◆ RemoveHeadList_IRP()

static PIRP RemoveHeadList_IRP ( IN OUT PLIST_ENTRY  QueueHead)
static

Definition at line 19 of file irpstream.cpp.

21 {
22  PIRP Irp;
23  PLIST_ENTRY CurEntry;
24 
25  for (CurEntry = QueueHead->Flink; CurEntry != QueueHead; CurEntry = CurEntry->Flink)
26  {
27  /* Get the IRP offset */
28  Irp = (PIRP)CONTAINING_RECORD(CurEntry, IRP, Tail.Overlay.ListEntry);
29 
30  /* Remove the cancel routine */
32  {
33  /* Remove the IRP from the list and return it */
34  RemoveEntryList(&Irp->Tail.Overlay.ListEntry);
35  return Irp;
36  }
37  }
38 
39  /* no non canceled irp has been found */
40  return NULL;
41 }
IoSetCancelRoutine(Irp, CancelRoutine)
FORCEINLINE BOOLEAN RemoveEntryList(_In_ PLIST_ENTRY Entry)
Definition: rtlfuncs.h:105
_In_ PIRP Irp
Definition: csq.h:116
PFLT_MESSAGE_WAITER_QUEUE CONTAINING_RECORD(Csq, DEVICE_EXTENSION, IrpQueue)) -> WaiterQ.mLock) _IRQL_raises_(DISPATCH_LEVEL) VOID NTAPI FltpAcquireMessageWaiterLock(_In_ PIO_CSQ Csq, _Out_ PKIRQL Irql)
Definition: Messaging.c:560
struct _LIST_ENTRY * Flink
Definition: typedefs.h:121
struct _IRP * PIRP
Definition: typedefs.h:119
#define NULL
Definition: types.h:112