ReactOS  0.4.14-dev-1332-g6db3d88
clntirp.c File Reference
#include "classp.h"
Include dependency graph for clntirp.c:

Go to the source code of this file.

Functions

VOID NTAPI EnqueueDeferredClientIrp (PCLASS_PRIVATE_FDO_DATA FdoData, PIRP Irp)
 
PIRP NTAPI DequeueDeferredClientIrp (PCLASS_PRIVATE_FDO_DATA FdoData)
 

Function Documentation

◆ DequeueDeferredClientIrp()

PIRP NTAPI DequeueDeferredClientIrp ( PCLASS_PRIVATE_FDO_DATA  FdoData)

Definition at line 45 of file clntirp.c.

46 {
47  KIRQL oldIrql;
48  PLIST_ENTRY listEntry;
49  PIRP irp;
50 
51  KeAcquireSpinLock(&FdoData->SpinLock, &oldIrql);
52  if (IsListEmpty(&FdoData->DeferredClientIrpList)){
53  listEntry = NULL;
54  }
55  else {
56  listEntry = RemoveHeadList(&FdoData->DeferredClientIrpList);
57  }
58  KeReleaseSpinLock(&FdoData->SpinLock, oldIrql);
59 
60  if (listEntry == NULL) {
61  irp = NULL;
62  } else {
63  irp = CONTAINING_RECORD(listEntry, IRP, Tail.Overlay.ListEntry);
64  ASSERT(irp->Type == IO_TYPE_IRP);
65  InitializeListHead(&irp->Tail.Overlay.ListEntry);
66  }
67 
68  return irp;
69 }
KSPIN_LOCK SpinLock
Definition: classp.h:456
IRP
Definition: iotypes.h:2463
_Must_inspect_result_ FORCEINLINE BOOLEAN IsListEmpty(_In_ const LIST_ENTRY *ListHead)
Definition: rtlfuncs.h:57
UCHAR KIRQL
Definition: env_spec_w32.h:591
smooth NULL
Definition: ftsmooth.c:416
FORCEINLINE PLIST_ENTRY RemoveHeadList(_Inout_ PLIST_ENTRY ListHead)
Definition: rtlfuncs.h:128
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
LIST_ENTRY DeferredClientIrpList
Definition: classp.h:443
#define KeAcquireSpinLock(sl, irql)
Definition: env_spec_w32.h:609
ASSERT((InvokeOnSuccess||InvokeOnError||InvokeOnCancel) ?(CompletionRoutine !=NULL) :TRUE)
#define IO_TYPE_IRP
Definition: typedefs.h:118
#define InitializeListHead(ListHead)
Definition: env_spec_w32.h:944
#define KeReleaseSpinLock(sl, irql)
Definition: env_spec_w32.h:627

Referenced by TransferPktComplete().

◆ EnqueueDeferredClientIrp()

VOID NTAPI EnqueueDeferredClientIrp ( PCLASS_PRIVATE_FDO_DATA  FdoData,
PIRP  Irp 
)

Definition at line 31 of file clntirp.c.

32 {
33  KIRQL oldIrql;
34 
35  KeAcquireSpinLock(&FdoData->SpinLock, &oldIrql);
36  InsertTailList(&FdoData->DeferredClientIrpList, &Irp->Tail.Overlay.ListEntry);
37  KeReleaseSpinLock(&FdoData->SpinLock, oldIrql);
38 }
_In_ PIRP Irp
Definition: csq.h:116
KSPIN_LOCK SpinLock
Definition: classp.h:456
#define InsertTailList(ListHead, Entry)
UCHAR KIRQL
Definition: env_spec_w32.h:591
LIST_ENTRY DeferredClientIrpList
Definition: classp.h:443
#define KeAcquireSpinLock(sl, irql)
Definition: env_spec_w32.h:609
#define KeReleaseSpinLock(sl, irql)
Definition: env_spec_w32.h:627

Referenced by ServiceTransferRequest().