ReactOS  0.4.15-dev-489-g75a0787
fcbtable.h
Go to the documentation of this file.
1 #ifndef _RXFCBTABLE_
2 #define _RXFCBTABLE_
3 
4 typedef struct _RX_FCB_TABLE_ENTRY {
12 
13 #define RX_FCB_TABLE_NUMBER_OF_HASH_BUCKETS 32
14 
15 typedef struct _RX_FCB_TABLE
16 {
19  volatile ULONG Version;
22  volatile LONG Lookups;
23  volatile LONG FailedLookups;
24  volatile LONG Compares;
29 
30 VOID
32  _Inout_ PRX_FCB_TABLE FcbTable,
33  _In_ BOOLEAN CaseInsensitiveMatch);
34 
35 VOID
37  _Inout_ PRX_FCB_TABLE FcbTable);
38 
39 PFCB
41  _In_ PRX_FCB_TABLE FcbTable,
43 
46  _Inout_ PRX_FCB_TABLE FcbTable,
47  _Inout_ PFCB Fcb);
48 
51  _Inout_ PRX_FCB_TABLE FcbTable,
52  _Inout_ PFCB Fcb);
53 
54 #define RxAcquireFcbTableLockShared(T, W) ExAcquireResourceSharedLite(&(T)->TableLock, W)
55 #define RxAcquireFcbTableLockExclusive(T, W) ExAcquireResourceExclusiveLite(&(T)->TableLock, W)
56 #define RxReleaseFcbTableLock(T) ExReleaseResourceLite(&(T)->TableLock)
57 
58 #define RxIsFcbTableLockExclusive(T) ExIsResourceAcquiredExclusiveLite(&(T)->TableLock)
59 
60 #define RxIsFcbTableLockAcquired(T) (ExIsResourceAcquiredSharedLite(&(T)->TableLock) || \
61  ExIsResourceAcquiredExclusiveLite(&(T)->TableLock))
62 
63 #ifdef __REACTOS__
64 #define FCB_HASH_BUCKET(T, H) &(T)->HashBuckets[H % (T)->NumberOfBuckets]
65 #endif
66 
67 #endif
volatile LONG FailedLookups
Definition: fcbtable.h:23
ULONG HashValue
Definition: fcbtable.h:7
NODE_BYTE_SIZE NodeByteSize
Definition: fcbtable.h:18
struct _RX_FCB_TABLE_ENTRY RX_FCB_TABLE_ENTRY
Definition: cdstruc.h:908
LIST_ENTRY HashLinks
Definition: fcbtable.h:9
LONG NTSTATUS
Definition: precomp.h:26
CSHORT NODE_BYTE_SIZE
Definition: nodetype.h:37
PRX_FCB_TABLE_ENTRY TableEntryForNull
Definition: fcbtable.h:26
LIST_ENTRY HashBuckets[RX_FCB_TABLE_NUMBER_OF_HASH_BUCKETS]
Definition: fcbtable.h:27
LONG Lookups
Definition: fcbtable.h:10
struct _RX_FCB_TABLE_ENTRY * PRX_FCB_TABLE_ENTRY
BOOLEAN CaseInsensitiveMatch
Definition: fcbtable.h:20
USHORT NumberOfBuckets
Definition: fcbtable.h:21
volatile LONG Compares
Definition: fcbtable.h:24
long LONG
Definition: pedump.c:60
struct _RX_FCB_TABLE * PRX_FCB_TABLE
unsigned char BOOLEAN
PFCB RxFcbTableLookupFcb(_In_ PRX_FCB_TABLE FcbTable, _In_ PUNICODE_STRING Path)
VOID RxInitializeFcbTable(_Inout_ PRX_FCB_TABLE FcbTable, _In_ BOOLEAN CaseInsensitiveMatch)
#define _Inout_
Definition: no_sal2.h:244
NTSTATUS RxFcbTableRemoveFcb(_Inout_ PRX_FCB_TABLE FcbTable, _Inout_ PFCB Fcb)
NODE_TYPE_CODE NodeTypeCode
Definition: fcbtable.h:5
Definition: typedefs.h:118
NTSTATUS RxFcbTableInsertFcb(_Inout_ PRX_FCB_TABLE FcbTable, _Inout_ PFCB Fcb)
#define _In_
Definition: no_sal2.h:204
VOID RxFinalizeFcbTable(_Inout_ PRX_FCB_TABLE FcbTable)
PRTL_UNICODE_STRING_BUFFER Path
NODE_BYTE_SIZE NodeByteSize
Definition: fcbtable.h:6
unsigned short USHORT
Definition: pedump.c:61
ERESOURCE TableLock
Definition: fcbtable.h:25
volatile LONG Lookups
Definition: fcbtable.h:22
#define RX_FCB_TABLE_NUMBER_OF_HASH_BUCKETS
Definition: fcbtable.h:13
ULONG ERESOURCE
Definition: env_spec_w32.h:594
unsigned int ULONG
Definition: retypes.h:1
NODE_TYPE_CODE NodeTypeCode
Definition: fcbtable.h:17
USHORT NODE_TYPE_CODE
Definition: nodetype.h:22
_In_ PFCB Fcb
Definition: cdprocs.h:159
Definition: fcbtable.h:4
UNICODE_STRING Path
Definition: fcbtable.h:8
struct _RX_FCB_TABLE RX_FCB_TABLE
volatile ULONG Version
Definition: fcbtable.h:19