ReactOS 0.4.15-dev-5893-g1bb4167
rxcontx.h File Reference
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

struct  _RX_TOPLEVELIRP_CONTEXT
 
struct  _NT_CREATE_PARAMETERS
 
struct  _RX_CONTEXT
 

Macros

#define RX_TOPLEVELIRP_CONTEXT_SIGNATURE   'LTxR'
 
#define RxInitializeTopLevelIrpContext(a, b, c)   __RxInitializeTopLevelIrpContext(a,b,c,0)
 
#define MRX_CONTEXT_FIELD_COUNT   4
 
#define RX_CONTEXT_PRESERVED_FLAGS
 
#define RX_CONTEXT_INITIALIZATION_FLAGS
 
#define RxSaveAndSetExceptionNoBreakpointFlag(R, F)
 
#define RxRestoreExceptionNoBreakpointFlag(R, F)
 
#define RxItsTheSameContext()   { NOTHING; }
 
#define MINIRDR_CALL_THROUGH(STATUS, DISPATCH, FUNC, ARGLIST)
 
#define MINIRDR_CALL(STATUS, CONTEXT, DISPATCH, FUNC, ARGLIST)
 
#define RxWaitSync(RxContext)
 
#define RxSignalSynchronousWaiter(RxContext)
 
#define RxInsertContextInSerializationQueue(SerializationQueue, RxContext)
 
#define RxTransferList(Destination, Source)
 
#define RxTransferListWithMutex(Destination, Source, Mutex)
 
#define RxDereferenceAndDeleteRxContext(RXCONTEXT)
 

Typedefs

typedef struct _RX_TOPLEVELIRP_CONTEXT RX_TOPLEVELIRP_CONTEXT
 
typedef struct _RX_TOPLEVELIRP_CONTEXTPRX_TOPLEVELIRP_CONTEXT
 
typedef NTSTATUS(NTAPIPRX_DISPATCH) (_In_ PRX_CONTEXT RxContext)
 
typedef struct _DFS_NAME_CONTEXT_PDFS_NAME_CONTEXT
 
typedef struct _NT_CREATE_PARAMETERS NT_CREATE_PARAMETERS
 
typedef struct _NT_CREATE_PARAMETERSPNT_CREATE_PARAMETERS
 
typedef struct _RX_CONTEXT RX_CONTEXT
 
typedef struct _RX_CONTEXTPRX_CONTEXT
 

Enumerations

enum  RX_CONTEXT_FLAGS {
  RX_CONTEXT_FLAG_FROM_POOL = 0x00000001 , RX_CONTEXT_FLAG_WAIT = 0x00000002 , RX_CONTEXT_FLAG_WRITE_THROUGH = 0x00000004 , RX_CONTEXT_FLAG_FLOPPY = 0x00000008 ,
  RX_CONTEXT_FLAG_RECURSIVE_CALL = 0x00000010 , RX_CONTEXT_FLAG_THIS_DEVICE_TOP_LEVEL = 0x00000020 , RX_CONTEXT_FLAG_DEFERRED_WRITE = 0x00000040 , RX_CONTEXT_FLAG_VERIFY_READ = 0x00000080 ,
  RX_CONTEXT_FLAG_STACK_IO_CONTEZT = 0x00000100 , RX_CONTEXT_FLAG_IN_FSP = 0x00000200 , RX_CONTEXT_FLAG_CREATE_MAILSLOT = 0x00000400 , RX_CONTEXT_FLAG_MAILSLOT_REPARSE = 0x00000800 ,
  RX_CONTEXT_FLAG_ASYNC_OPERATION = 0x00001000 , RX_CONTEXT_FLAG_NO_COMPLETE_FROM_FSP = 0x00002000 , RX_CONTEXT_FLAG_POST_ON_STABLE_CONDITION = 0x00004000 , RX_CONTEXT_FLAG_FSP_DELAYED_OVERFLOW_QUEUE = 0x00008000 ,
  RX_CONTEXT_FLAG_FSP_CRITICAL_OVERFLOW_QUEUE = 0x00010000 , RX_CONTEXT_FLAG_MINIRDR_INVOKED = 0x00020000 , RX_CONTEXT_FLAG_WAITING_FOR_RESOURCE = 0x00040000 , RX_CONTEXT_FLAG_CANCELLED = 0x00080000 ,
  RX_CONTEXT_FLAG_SYNC_EVENT_WAITERS = 0x00100000 , RX_CONTEXT_FLAG_NO_PREPOSTING_NEEDED = 0x00200000 , RX_CONTEXT_FLAG_BYPASS_VALIDOP_CHECK = 0x00400000 , RX_CONTEXT_FLAG_BLOCKED_PIPE_RESUME = 0x00800000 ,
  RX_CONTEXT_FLAG_IN_SERIALIZATION_QUEUE = 0x01000000 , RX_CONTEXT_FLAG_NO_EXCEPTION_BREAKPOINT = 0x02000000 , RX_CONTEXT_FLAG_NEEDRECONNECT = 0x04000000 , RX_CONTEXT_FLAG_MUST_SUCCEED = 0x08000000 ,
  RX_CONTEXT_FLAG_MUST_SUCCEED_NONBLOCKING = 0x10000000 , RX_CONTEXT_FLAG_MUST_SUCCEED_ALLOCATED = 0x20000000 , RX_CONTEXT_FLAG_MINIRDR_INITIATED = 0x80000000
}
 
enum  RX_CONTEXT_CREATE_FLAGS {
  RX_CONTEXT_CREATE_FLAG_UNC_NAME = 0x1 , RX_CONTEXT_CREATE_FLAG_STRIPPED_TRAILING_BACKSLASH = 0x2 , RX_CONTEXT_CREATE_FLAG_ADDEDBACKSLASH = 0x4 , RX_CONTEXT_CREATE_FLAG_REPARSE = 0x8 ,
  RX_CONTEXT_CREATE_FLAG_SPECIAL_PATH = 0x10
}
 
enum  RX_CONTEXT_LOWIO_FLAGS {
  RXCONTEXT_FLAG4LOWIO_PIPE_OPERATION = 0x1 , RXCONTEXT_FLAG4LOWIO_PIPE_SYNC_OPERATION = 0x2 , RXCONTEXT_FLAG4LOWIO_READAHEAD = 0x4 , RXCONTEXT_FLAG4LOWIO_THIS_READ_ENLARGED = 0x8 ,
  RXCONTEXT_FLAG4LOWIO_THIS_IO_BUFFERED = 0x10 , RXCONTEXT_FLAG4LOWIO_LOCK_FCB_RESOURCE_HELD = 0x20 , RXCONTEXT_FLAG4LOWIO_LOCK_WAS_QUEUED_IN_LOCKMANAGER = 0x40 , RXCONTEXT_FLAG4LOWIO_THIS_IO_FAST = 0x80 ,
  RXCONTEXT_FLAG4LOWIO_LOCK_OPERATION_COMPLETED = 0x100 , RXCONTEXT_FLAG4LOWIO_LOCK_BUFFERED_ON_ENTRY = 0x200
}
 

Functions

BOOLEAN RxTryToBecomeTheTopLevelIrp (_Inout_ PRX_TOPLEVELIRP_CONTEXT TopLevelContext, _In_ PIRP Irp, _In_ PRDBSS_DEVICE_OBJECT RxDeviceObject, _In_ BOOLEAN ForceTopLevel)
 
VOID __RxInitializeTopLevelIrpContext (_Inout_ PRX_TOPLEVELIRP_CONTEXT TopLevelContext, _In_ PIRP Irp, _In_ PRDBSS_DEVICE_OBJECT RxDeviceObject, _In_ ULONG Flags)
 
PIRP RxGetTopIrpIfRdbssIrp (VOID)
 
PRDBSS_DEVICE_OBJECT RxGetTopDeviceObjectIfRdbssIrp (VOID)
 
VOID RxUnwindTopLevelIrp (_Inout_ PRX_TOPLEVELIRP_CONTEXT TopLevelContext)
 
BOOLEAN RxIsThisTheTopLevelIrp (_In_ PIRP Irp)
 
FORCEINLINE PRX_CONTEXT RxRemoveFirstContextFromSerializationQueue (PLIST_ENTRY SerializationQueue)
 
NTSTATUS RxCancelNotifyChangeDirectoryRequestsForVNetRoot (PV_NET_ROOT VNetRoot, BOOLEAN ForceFilesClosed)
 
VOID RxCancelNotifyChangeDirectoryRequestsForFobx (PFOBX Fobx)
 
VOID NTAPI RxInitializeContext (_In_ PIRP Irp, _In_ PRDBSS_DEVICE_OBJECT RxDeviceObject, _In_ ULONG InitialContextFlags, _Inout_ PRX_CONTEXT RxContext)
 
PRX_CONTEXT NTAPI RxCreateRxContext (_In_ PIRP Irp, _In_ PRDBSS_DEVICE_OBJECT RxDeviceObject, _In_ ULONG InitialContextFlags)
 
VOID NTAPI RxPrepareContextForReuse (_Inout_ PRX_CONTEXT RxContext)
 
VOID NTAPI RxDereferenceAndDeleteRxContext_Real (_In_ PRX_CONTEXT RxContext)
 
VOID NTAPI RxReinitializeContext (_Inout_ PRX_CONTEXT RxContext)
 
VOID NTAPI RxResumeBlockedOperations_Serially (_Inout_ PRX_CONTEXT RxContext, _Inout_ PLIST_ENTRY BlockingIoQ)
 
VOID RxResumeBlockedOperations_ALL (_Inout_ PRX_CONTEXT RxContext)
 
VOID RxCancelBlockingOperation (_Inout_ PRX_CONTEXT RxContext)
 
VOID RxRemoveOperationFromBlockingQueue (_Inout_ PRX_CONTEXT RxContext)
 

Variables

NPAGED_LOOKASIDE_LIST RxContextLookasideList
 
FAST_MUTEX RxContextPerFileSerializationMutex
 

Macro Definition Documentation

◆ MINIRDR_CALL

#define MINIRDR_CALL (   STATUS,
  CONTEXT,
  DISPATCH,
  FUNC,
  ARGLIST 
)
Value:
{ \
ASSERT(DISPATCH); \
ASSERT(NodeType(DISPATCH) == RDBSS_NTC_MINIRDR_DISPATCH); \
if (DISPATCH->FUNC == NULL) \
{ \
} \
else \
{ \
{ \
RtlZeroMemory(&((CONTEXT)->MRxContext[0]), \
sizeof((CONTEXT)->MRxContext)); \
STATUS = DISPATCH->FUNC ARGLIST; \
} \
else \
{ \
} \
} \
}
#define STATUS
Definition: blue.h:116
#define NULL
Definition: types.h:112
#define NodeType(P)
Definition: nodetype.h:51
#define BooleanFlagOn(F, SF)
Definition: ext2fs.h:183
#define STATUS_NOT_IMPLEMENTED
Definition: ntstatus.h:239
@ RX_CONTEXT_FLAG_CANCELLED
Definition: rxcontx.h:300
#define RDBSS_NTC_MINIRDR_DISPATCH
Definition: nodetype.h:64
#define STATUS_CANCELLED
Definition: udferr_usr.h:170
_Must_inspect_result_ _In_ ULONG Flags
Definition: wsk.h:170

Definition at line 389 of file rxcontx.h.

◆ MINIRDR_CALL_THROUGH

#define MINIRDR_CALL_THROUGH (   STATUS,
  DISPATCH,
  FUNC,
  ARGLIST 
)
Value:
{ \
ASSERT(DISPATCH); \
ASSERT(NodeType(DISPATCH) == RDBSS_NTC_MINIRDR_DISPATCH); \
if (DISPATCH->FUNC == NULL) \
{ \
} \
else \
{ \
STATUS = DISPATCH->FUNC ARGLIST; \
} \
}

Definition at line 375 of file rxcontx.h.

◆ MRX_CONTEXT_FIELD_COUNT

#define MRX_CONTEXT_FIELD_COUNT   4

Definition at line 68 of file rxcontx.h.

◆ RX_CONTEXT_INITIALIZATION_FLAGS

#define RX_CONTEXT_INITIALIZATION_FLAGS
Value:
@ RX_CONTEXT_FLAG_MUST_SUCCEED_NONBLOCKING
Definition: rxcontx.h:309
@ RX_CONTEXT_FLAG_MUST_SUCCEED
Definition: rxcontx.h:308
@ RX_CONTEXT_FLAG_WAIT
Definition: rxcontx.h:282

Definition at line 318 of file rxcontx.h.

◆ RX_CONTEXT_PRESERVED_FLAGS

#define RX_CONTEXT_PRESERVED_FLAGS
Value:
@ RX_CONTEXT_FLAG_FROM_POOL
Definition: rxcontx.h:281
@ RX_CONTEXT_FLAG_MUST_SUCCEED_ALLOCATED
Definition: rxcontx.h:310
@ RX_CONTEXT_FLAG_IN_FSP
Definition: rxcontx.h:290

Definition at line 314 of file rxcontx.h.

◆ RX_TOPLEVELIRP_CONTEXT_SIGNATURE

#define RX_TOPLEVELIRP_CONTEXT_SIGNATURE   'LTxR'

Definition at line 4 of file rxcontx.h.

◆ RxDereferenceAndDeleteRxContext

#define RxDereferenceAndDeleteRxContext (   RXCONTEXT)
Value:
{ \
RxDereferenceAndDeleteRxContext_Real((RXCONTEXT)); \
}

Definition at line 514 of file rxcontx.h.

◆ RxInitializeTopLevelIrpContext

#define RxInitializeTopLevelIrpContext (   a,
  b,
  c 
)    __RxInitializeTopLevelIrpContext(a,b,c,0)

Definition at line 38 of file rxcontx.h.

◆ RxInsertContextInSerializationQueue

#define RxInsertContextInSerializationQueue (   SerializationQueue,
  RxContext 
)
Value:
InsertTailList(SerializationQueue, &((RxContext)->RxContextSerializationQLinks))
@ RX_CONTEXT_FLAG_IN_SERIALIZATION_QUEUE
Definition: rxcontx.h:305

Definition at line 421 of file rxcontx.h.

◆ RxItsTheSameContext

#define RxItsTheSameContext ( )    { NOTHING; }

Definition at line 370 of file rxcontx.h.

◆ RxRestoreExceptionNoBreakpointFlag

#define RxRestoreExceptionNoBreakpointFlag (   R,
  F 
)

Definition at line 358 of file rxcontx.h.

◆ RxSaveAndSetExceptionNoBreakpointFlag

#define RxSaveAndSetExceptionNoBreakpointFlag (   R,
  F 
)

Definition at line 357 of file rxcontx.h.

◆ RxSignalSynchronousWaiter

#define RxSignalSynchronousWaiter (   RxContext)
Value:
KeSetEvent(&(RxContext)->SyncEvent, 0, FALSE)
#define FALSE
Definition: types.h:117
@ RX_CONTEXT_FLAG_SYNC_EVENT_WAITERS
Definition: rxcontx.h:301

Definition at line 417 of file rxcontx.h.

◆ RxTransferList

#define RxTransferList (   Destination,
  Source 
)
Value:
if (IsListEmpty((Source))) \
InitializeListHead((Destination)); \
else \
{ \
*(Destination) = *(Source); \
(Destination)->Flink->Blink = (Destination); \
(Destination)->Blink->Flink = (Destination); \
InitializeListHead((Source)); \
}
#define IsListEmpty(ListHead)
Definition: env_spec_w32.h:954
_In_ UINT _In_ UINT _In_ PNDIS_PACKET Source
Definition: ndis.h:3169
_In_ PUNICODE_STRING _Inout_ PUNICODE_STRING Destination
Definition: rtlfuncs.h:2992

Definition at line 449 of file rxcontx.h.

◆ RxTransferListWithMutex

#define RxTransferListWithMutex (   Destination,
  Source,
  Mutex 
)
Value:
{ \
ExAcquireFastMutex(Mutex); \
RxTransferList(Destination, Source); \
ExReleaseFastMutex(Mutex); \
}
Definition: Mutex.h:16

Definition at line 460 of file rxcontx.h.

◆ RxWaitSync

#define RxWaitSync (   RxContext)
Value:
KeWaitForSingleObject(&(RxContext)->SyncEvent, \
#define KernelMode
Definition: asm.h:34
@ Executive
Definition: ketypes.h:403

Definition at line 412 of file rxcontx.h.

Typedef Documentation

◆ NT_CREATE_PARAMETERS

◆ PDFS_NAME_CONTEXT

Definition at line 83 of file rxcontx.h.

◆ PNT_CREATE_PARAMETERS

◆ PRX_CONTEXT

◆ PRX_DISPATCH

typedef NTSTATUS(NTAPI * PRX_DISPATCH) (_In_ PRX_CONTEXT RxContext)

Definition at line 78 of file rxcontx.h.

◆ PRX_TOPLEVELIRP_CONTEXT

◆ RX_CONTEXT

◆ RX_TOPLEVELIRP_CONTEXT

Enumeration Type Documentation

◆ RX_CONTEXT_CREATE_FLAGS

Enumerator
RX_CONTEXT_CREATE_FLAG_UNC_NAME 
RX_CONTEXT_CREATE_FLAG_STRIPPED_TRAILING_BACKSLASH 
RX_CONTEXT_CREATE_FLAG_ADDEDBACKSLASH 
RX_CONTEXT_CREATE_FLAG_REPARSE 
RX_CONTEXT_CREATE_FLAG_SPECIAL_PATH 

Definition at line 322 of file rxcontx.h.

323{
RX_CONTEXT_CREATE_FLAGS
Definition: rxcontx.h:323
@ RX_CONTEXT_CREATE_FLAG_SPECIAL_PATH
Definition: rxcontx.h:328
@ RX_CONTEXT_CREATE_FLAG_UNC_NAME
Definition: rxcontx.h:324
@ RX_CONTEXT_CREATE_FLAG_REPARSE
Definition: rxcontx.h:327
@ RX_CONTEXT_CREATE_FLAG_STRIPPED_TRAILING_BACKSLASH
Definition: rxcontx.h:325
@ RX_CONTEXT_CREATE_FLAG_ADDEDBACKSLASH
Definition: rxcontx.h:326

◆ RX_CONTEXT_FLAGS

Enumerator
RX_CONTEXT_FLAG_FROM_POOL 
RX_CONTEXT_FLAG_WAIT 
RX_CONTEXT_FLAG_WRITE_THROUGH 
RX_CONTEXT_FLAG_FLOPPY 
RX_CONTEXT_FLAG_RECURSIVE_CALL 
RX_CONTEXT_FLAG_THIS_DEVICE_TOP_LEVEL 
RX_CONTEXT_FLAG_DEFERRED_WRITE 
RX_CONTEXT_FLAG_VERIFY_READ 
RX_CONTEXT_FLAG_STACK_IO_CONTEZT 
RX_CONTEXT_FLAG_IN_FSP 
RX_CONTEXT_FLAG_CREATE_MAILSLOT 
RX_CONTEXT_FLAG_MAILSLOT_REPARSE 
RX_CONTEXT_FLAG_ASYNC_OPERATION 
RX_CONTEXT_FLAG_NO_COMPLETE_FROM_FSP 
RX_CONTEXT_FLAG_POST_ON_STABLE_CONDITION 
RX_CONTEXT_FLAG_FSP_DELAYED_OVERFLOW_QUEUE 
RX_CONTEXT_FLAG_FSP_CRITICAL_OVERFLOW_QUEUE 
RX_CONTEXT_FLAG_MINIRDR_INVOKED 
RX_CONTEXT_FLAG_WAITING_FOR_RESOURCE 
RX_CONTEXT_FLAG_CANCELLED 
RX_CONTEXT_FLAG_SYNC_EVENT_WAITERS 
RX_CONTEXT_FLAG_NO_PREPOSTING_NEEDED 
RX_CONTEXT_FLAG_BYPASS_VALIDOP_CHECK 
RX_CONTEXT_FLAG_BLOCKED_PIPE_RESUME 
RX_CONTEXT_FLAG_IN_SERIALIZATION_QUEUE 
RX_CONTEXT_FLAG_NO_EXCEPTION_BREAKPOINT 
RX_CONTEXT_FLAG_NEEDRECONNECT 
RX_CONTEXT_FLAG_MUST_SUCCEED 
RX_CONTEXT_FLAG_MUST_SUCCEED_NONBLOCKING 
RX_CONTEXT_FLAG_MUST_SUCCEED_ALLOCATED 
RX_CONTEXT_FLAG_MINIRDR_INITIATED 

Definition at line 279 of file rxcontx.h.

280{
281 RX_CONTEXT_FLAG_FROM_POOL = 0x00000001,
282 RX_CONTEXT_FLAG_WAIT = 0x00000002,
284 RX_CONTEXT_FLAG_FLOPPY = 0x00000008,
288 RX_CONTEXT_FLAG_VERIFY_READ = 0x00000080,
290 RX_CONTEXT_FLAG_IN_FSP = 0x00000200,
300 RX_CONTEXT_FLAG_CANCELLED = 0x00080000,
308 RX_CONTEXT_FLAG_MUST_SUCCEED = 0x08000000,
RX_CONTEXT_FLAGS
Definition: rxcontx.h:280
@ RX_CONTEXT_FLAG_RECURSIVE_CALL
Definition: rxcontx.h:285
@ RX_CONTEXT_FLAG_CREATE_MAILSLOT
Definition: rxcontx.h:291
@ RX_CONTEXT_FLAG_THIS_DEVICE_TOP_LEVEL
Definition: rxcontx.h:286
@ RX_CONTEXT_FLAG_WAITING_FOR_RESOURCE
Definition: rxcontx.h:299
@ RX_CONTEXT_FLAG_NO_PREPOSTING_NEEDED
Definition: rxcontx.h:302
@ RX_CONTEXT_FLAG_FSP_DELAYED_OVERFLOW_QUEUE
Definition: rxcontx.h:296
@ RX_CONTEXT_FLAG_POST_ON_STABLE_CONDITION
Definition: rxcontx.h:295
@ RX_CONTEXT_FLAG_MINIRDR_INVOKED
Definition: rxcontx.h:298
@ RX_CONTEXT_FLAG_WRITE_THROUGH
Definition: rxcontx.h:283
@ RX_CONTEXT_FLAG_BYPASS_VALIDOP_CHECK
Definition: rxcontx.h:303
@ RX_CONTEXT_FLAG_BLOCKED_PIPE_RESUME
Definition: rxcontx.h:304
@ RX_CONTEXT_FLAG_NO_COMPLETE_FROM_FSP
Definition: rxcontx.h:294
@ RX_CONTEXT_FLAG_FLOPPY
Definition: rxcontx.h:284
@ RX_CONTEXT_FLAG_DEFERRED_WRITE
Definition: rxcontx.h:287
@ RX_CONTEXT_FLAG_ASYNC_OPERATION
Definition: rxcontx.h:293
@ RX_CONTEXT_FLAG_MAILSLOT_REPARSE
Definition: rxcontx.h:292
@ RX_CONTEXT_FLAG_FSP_CRITICAL_OVERFLOW_QUEUE
Definition: rxcontx.h:297
@ RX_CONTEXT_FLAG_STACK_IO_CONTEZT
Definition: rxcontx.h:289
@ RX_CONTEXT_FLAG_NO_EXCEPTION_BREAKPOINT
Definition: rxcontx.h:306
@ RX_CONTEXT_FLAG_NEEDRECONNECT
Definition: rxcontx.h:307
@ RX_CONTEXT_FLAG_VERIFY_READ
Definition: rxcontx.h:288
@ RX_CONTEXT_FLAG_MINIRDR_INITIATED
Definition: rxcontx.h:311

◆ RX_CONTEXT_LOWIO_FLAGS

Enumerator
RXCONTEXT_FLAG4LOWIO_PIPE_OPERATION 
RXCONTEXT_FLAG4LOWIO_PIPE_SYNC_OPERATION 
RXCONTEXT_FLAG4LOWIO_READAHEAD 
RXCONTEXT_FLAG4LOWIO_THIS_READ_ENLARGED 
RXCONTEXT_FLAG4LOWIO_THIS_IO_BUFFERED 
RXCONTEXT_FLAG4LOWIO_LOCK_FCB_RESOURCE_HELD 
RXCONTEXT_FLAG4LOWIO_LOCK_WAS_QUEUED_IN_LOCKMANAGER 
RXCONTEXT_FLAG4LOWIO_THIS_IO_FAST 
RXCONTEXT_FLAG4LOWIO_LOCK_OPERATION_COMPLETED 
RXCONTEXT_FLAG4LOWIO_LOCK_BUFFERED_ON_ENTRY 

Definition at line 331 of file rxcontx.h.

331 {
RX_CONTEXT_LOWIO_FLAGS
Definition: rxcontx.h:331
@ RXCONTEXT_FLAG4LOWIO_LOCK_FCB_RESOURCE_HELD
Definition: rxcontx.h:337
@ RXCONTEXT_FLAG4LOWIO_THIS_READ_ENLARGED
Definition: rxcontx.h:335
@ RXCONTEXT_FLAG4LOWIO_LOCK_BUFFERED_ON_ENTRY
Definition: rxcontx.h:341
@ RXCONTEXT_FLAG4LOWIO_READAHEAD
Definition: rxcontx.h:334
@ RXCONTEXT_FLAG4LOWIO_LOCK_OPERATION_COMPLETED
Definition: rxcontx.h:340
@ RXCONTEXT_FLAG4LOWIO_PIPE_OPERATION
Definition: rxcontx.h:332
@ RXCONTEXT_FLAG4LOWIO_PIPE_SYNC_OPERATION
Definition: rxcontx.h:333
@ RXCONTEXT_FLAG4LOWIO_LOCK_WAS_QUEUED_IN_LOCKMANAGER
Definition: rxcontx.h:338
@ RXCONTEXT_FLAG4LOWIO_THIS_IO_FAST
Definition: rxcontx.h:339
@ RXCONTEXT_FLAG4LOWIO_THIS_IO_BUFFERED
Definition: rxcontx.h:336

Function Documentation

◆ __RxInitializeTopLevelIrpContext()

VOID __RxInitializeTopLevelIrpContext ( _Inout_ PRX_TOPLEVELIRP_CONTEXT  TopLevelContext,
_In_ PIRP  Irp,
_In_ PRDBSS_DEVICE_OBJECT  RxDeviceObject,
_In_ ULONG  Flags 
)

◆ RxCancelBlockingOperation()

VOID RxCancelBlockingOperation ( _Inout_ PRX_CONTEXT  RxContext)

Referenced by RxpCancelRoutine().

◆ RxCancelNotifyChangeDirectoryRequestsForFobx()

VOID RxCancelNotifyChangeDirectoryRequestsForFobx ( PFOBX  Fobx)

Definition at line 963 of file rdbss.c.

965{
969 LIST_ENTRY ContextsToCancel;
970
971 /* Init a list for the contexts to cancel */
972 InitializeListHead(&ContextsToCancel);
973
974 /* Lock our list lock */
976
977 /* Now, browse all the active contexts, to find the associated ones */
979 while (Entry != &RxActiveContexts)
980 {
981 Context = CONTAINING_RECORD(Entry, RX_CONTEXT, ContextListEntry);
982 Entry = Entry->Flink;
983
984 /* Not the IRP we're looking for, ignore */
985 if (Context->MajorFunction != IRP_MJ_DIRECTORY_CONTROL ||
986 Context->MinorFunction != IRP_MN_NOTIFY_CHANGE_DIRECTORY)
987 {
988 continue;
989 }
990
991 /* Not the FOBX we're looking for, ignore */
992 if ((PFOBX)Context->pFobx != Fobx)
993 {
994 continue;
995 }
996
997 /* No cancel routine (can't be cancel, then), ignore */
998 if (Context->MRxCancelRoutine == NULL)
999 {
1000 continue;
1001 }
1002
1003 /* Mark our context as cancelled */
1005
1006 /* Move it to our list */
1007 RemoveEntryList(&Context->ContextListEntry);
1008 InsertTailList(&ContextsToCancel, &Context->ContextListEntry);
1009
1010 InterlockedIncrement((volatile long *)&Context->ReferenceCount);
1011 }
1012
1013 /* Done with the contexts */
1015
1016 /* Now, handle all our "extracted" contexts */
1017 while (!IsListEmpty(&ContextsToCancel))
1018 {
1019 Entry = RemoveHeadList(&ContextsToCancel);
1020 Context = CONTAINING_RECORD(Entry, RX_CONTEXT, ContextListEntry);
1021
1022 /* If they had an associated IRP (should be always true) */
1023 if (Context->CurrentIrp != NULL)
1024 {
1025 /* Then, call cancel routine */
1026 ASSERT(Context->MRxCancelRoutine != NULL);
1027 DPRINT1("Canceling %p with %p\n", Context, Context->MRxCancelRoutine);
1028 Context->MRxCancelRoutine(Context);
1029 }
1030
1031 /* And delete the context */
1033 }
1034}
#define InterlockedIncrement
Definition: armddk.h:53
#define DPRINT1
Definition: precomp.h:8
#define RemoveEntryList(Entry)
Definition: env_spec_w32.h:986
#define InsertTailList(ListHead, Entry)
UCHAR KIRQL
Definition: env_spec_w32.h:591
#define KeReleaseSpinLock(sl, irql)
Definition: env_spec_w32.h:627
#define KeAcquireSpinLock(sl, irql)
Definition: env_spec_w32.h:609
#define RemoveHeadList(ListHead)
Definition: env_spec_w32.h:964
#define InitializeListHead(ListHead)
Definition: env_spec_w32.h:944
#define SetFlag(_F, _SF)
Definition: ext2fs.h:187
#define ASSERT(a)
Definition: mode.c:44
LIST_ENTRY RxActiveContexts
Definition: rdbss.c:535
#define IRP_MJ_DIRECTORY_CONTROL
Definition: rdpdr.c:51
#define IRP_MN_NOTIFY_CHANGE_DIRECTORY
Definition: rdpdr.c:56
#define RxDereferenceAndDeleteRxContext(RXCONTEXT)
Definition: rxcontx.h:514
RX_SPIN_LOCK RxStrucSupSpinLock
Definition: rxce.c:123
base of all file and directory entries
Definition: entries.h:83
Definition: fcb.h:305
Definition: typedefs.h:120
struct _LIST_ENTRY * Flink
Definition: typedefs.h:121
#define CONTAINING_RECORD(address, type, field)
Definition: typedefs.h:260
_Requires_lock_held_ Interrupt _Releases_lock_ Interrupt _In_ _IRQL_restores_ KIRQL OldIrql
Definition: kefuncs.h:792

Referenced by RxCommonCleanup().

◆ RxCancelNotifyChangeDirectoryRequestsForVNetRoot()

NTSTATUS RxCancelNotifyChangeDirectoryRequestsForVNetRoot ( PV_NET_ROOT  VNetRoot,
BOOLEAN  ForceFilesClosed 
)

Definition at line 1040 of file rdbss.c.

1043{
1044 KIRQL OldIrql;
1048 LIST_ENTRY ContextsToCancel;
1049
1050 /* Init a list for the contexts to cancel */
1051 InitializeListHead(&ContextsToCancel);
1052
1053 /* Lock our list lock */
1055
1056 /* Assume success */
1058
1059 /* Now, browse all the active contexts, to find the associated ones */
1061 while (Entry != &RxActiveContexts)
1062 {
1063 Context = CONTAINING_RECORD(Entry, RX_CONTEXT, ContextListEntry);
1064 Entry = Entry->Flink;
1065
1066 /* Not the IRP we're looking for, ignore */
1067 if (Context->MajorFunction != IRP_MJ_DIRECTORY_CONTROL ||
1068 Context->MinorFunction != IRP_MN_NOTIFY_CHANGE_DIRECTORY)
1069 {
1070 continue;
1071 }
1072
1073 /* Not the VNetRoot we're looking for, ignore */
1074 if (Context->pFcb == NULL ||
1075 (PV_NET_ROOT)Context->NotifyChangeDirectory.pVNetRoot != VNetRoot)
1076 {
1077 continue;
1078 }
1079
1080 /* No cancel routine (can't be cancel, then), ignore */
1081 if (Context->MRxCancelRoutine == NULL)
1082 {
1083 continue;
1084 }
1085
1086 /* At that point, we found a matching context
1087 * If we're not asked to force close, then fail - it's still open
1088 */
1089 if (!ForceFilesClosed)
1090 {
1092 break;
1093 }
1094
1095 /* Mark our context as cancelled */
1097
1098 /* Move it to our list */
1099 RemoveEntryList(&Context->ContextListEntry);
1100 InsertTailList(&ContextsToCancel, &Context->ContextListEntry);
1101
1102 InterlockedIncrement((volatile long *)&Context->ReferenceCount);
1103 }
1104
1105 /* Done with the contexts */
1107
1108 if (Status != STATUS_SUCCESS)
1109 {
1110 return Status;
1111 }
1112
1113 /* Now, handle all our "extracted" contexts */
1114 while (!IsListEmpty(&ContextsToCancel))
1115 {
1116 Entry = RemoveHeadList(&ContextsToCancel);
1117 Context = CONTAINING_RECORD(Entry, RX_CONTEXT, ContextListEntry);
1118
1119 /* If they had an associated IRP (should be always true) */
1120 if (Context->CurrentIrp != NULL)
1121 {
1122 /* Then, call cancel routine */
1123 ASSERT(Context->MRxCancelRoutine != NULL);
1124 DPRINT1("Canceling %p with %p\n", Context, Context->MRxCancelRoutine);
1125 Context->MRxCancelRoutine(Context);
1126 }
1127
1128 /* And delete the context */
1130 }
1131
1132 return Status;
1133}
LONG NTSTATUS
Definition: precomp.h:26
Status
Definition: gdiplustypes.h:25
#define STATUS_FILES_OPEN
Definition: ntstatus.h:499
#define STATUS_SUCCESS
Definition: shellext.h:65

Referenced by RxFinalizeConnection().

◆ RxCreateRxContext()

PRX_CONTEXT NTAPI RxCreateRxContext ( _In_ PIRP  Irp,
_In_ PRDBSS_DEVICE_OBJECT  RxDeviceObject,
_In_ ULONG  InitialContextFlags 
)

◆ RxDereferenceAndDeleteRxContext_Real()

VOID NTAPI RxDereferenceAndDeleteRxContext_Real ( _In_ PRX_CONTEXT  RxContext)

◆ RxGetTopDeviceObjectIfRdbssIrp()

PRDBSS_DEVICE_OBJECT RxGetTopDeviceObjectIfRdbssIrp ( VOID  )

Definition at line 6826 of file rdbss.c.

6828{
6829 PIRP TopLevelIrp;
6830 PRDBSS_DEVICE_OBJECT TopDevice = NULL;
6831
6832 TopLevelIrp = IoGetTopLevelIrp();
6834 {
6835 TopDevice = ((PRX_TOPLEVELIRP_CONTEXT)TopLevelIrp)->RxDeviceObject;
6836 }
6837
6838 return TopDevice;
6839}
PIRP NTAPI IoGetTopLevelIrp(VOID)
Definition: irp.c:1843
BOOLEAN RxIsThisAnRdbssTopLevelContext(PRX_TOPLEVELIRP_CONTEXT TopLevelContext)
Definition: rdbss.c:7075
struct _RX_TOPLEVELIRP_CONTEXT * PRX_TOPLEVELIRP_CONTEXT

Referenced by RxInitializeContext().

◆ RxGetTopIrpIfRdbssIrp()

PIRP RxGetTopIrpIfRdbssIrp ( VOID  )

Definition at line 6845 of file rdbss.c.

6847{
6848 PIRP Irp = NULL;
6850
6853 {
6854 Irp = TopLevel->Irp;
6855 }
6856
6857 return Irp;
6858}
_In_ PIRP Irp
Definition: csq.h:116
IN PFCB IN PCCB IN TYPE_OF_OPEN IN BOOLEAN IN BOOLEAN TopLevel
Definition: fatprocs.h:2417

Referenced by RxCommonWrite(), RxReleaseFcbFromLazyWrite(), and RxReleaseFcbFromReadAhead().

◆ RxInitializeContext()

VOID NTAPI RxInitializeContext ( _In_ PIRP  Irp,
_In_ PRDBSS_DEVICE_OBJECT  RxDeviceObject,
_In_ ULONG  InitialContextFlags,
_Inout_ PRX_CONTEXT  RxContext 
)

◆ RxIsThisTheTopLevelIrp()

BOOLEAN RxIsThisTheTopLevelIrp ( _In_ PIRP  Irp)

◆ RxPrepareContextForReuse()

VOID NTAPI RxPrepareContextForReuse ( _Inout_ PRX_CONTEXT  RxContext)

◆ RxReinitializeContext()

VOID NTAPI RxReinitializeContext ( _Inout_ PRX_CONTEXT  RxContext)

Referenced by RxCommonCreate().

◆ RxRemoveFirstContextFromSerializationQueue()

FORCEINLINE PRX_CONTEXT RxRemoveFirstContextFromSerializationQueue ( PLIST_ENTRY  SerializationQueue)

Definition at line 427 of file rxcontx.h.

429{
430 if (IsListEmpty(SerializationQueue))
431 {
432 return NULL;
433 }
434 else
435 {
436 PRX_CONTEXT Context = CONTAINING_RECORD(SerializationQueue->Flink,
438 RxContextSerializationQLinks);
439
440 RemoveEntryList(SerializationQueue->Flink);
441
442 Context->RxContextSerializationQLinks.Flink = NULL;
443 Context->RxContextSerializationQLinks.Blink = NULL;
444
445 return Context;
446 }
447}

Referenced by RxUpdateCondition().

◆ RxRemoveOperationFromBlockingQueue()

VOID RxRemoveOperationFromBlockingQueue ( _Inout_ PRX_CONTEXT  RxContext)

◆ RxResumeBlockedOperations_ALL()

VOID RxResumeBlockedOperations_ALL ( _Inout_ PRX_CONTEXT  RxContext)

◆ RxResumeBlockedOperations_Serially()

VOID NTAPI RxResumeBlockedOperations_Serially ( _Inout_ PRX_CONTEXT  RxContext,
_Inout_ PLIST_ENTRY  BlockingIoQ 
)

◆ RxTryToBecomeTheTopLevelIrp()

BOOLEAN RxTryToBecomeTheTopLevelIrp ( _Inout_ PRX_TOPLEVELIRP_CONTEXT  TopLevelContext,
_In_ PIRP  Irp,
_In_ PRDBSS_DEVICE_OBJECT  RxDeviceObject,
_In_ BOOLEAN  ForceTopLevel 
)

◆ RxUnwindTopLevelIrp()

VOID RxUnwindTopLevelIrp ( _Inout_ PRX_TOPLEVELIRP_CONTEXT  TopLevelContext)

Variable Documentation

◆ RxContextLookasideList

NPAGED_LOOKASIDE_LIST RxContextLookasideList
extern

Definition at line 536 of file rdbss.c.

Referenced by RxCreateRxContext(), RxDereferenceAndDeleteRxContext_Real(), and RxDriverEntry().

◆ RxContextPerFileSerializationMutex

FAST_MUTEX RxContextPerFileSerializationMutex
extern