ReactOS  0.4.14-dev-1233-gf5658fd
prefix.h
Go to the documentation of this file.
1 #ifndef _RXPREFIX_
2 #define _RXPREFIX_
3 
4 typedef struct _RX_CONNECTION_ID
5 {
6  union
7  {
10  };
12 
13 ULONG
16 
17 PVOID
19  _In_ PRX_PREFIX_TABLE ThisTable,
20  _In_ PUNICODE_STRING CanonicalName,
22  _In_ PRX_CONNECTION_ID ConnectionId);
23 
26  _Inout_ PRX_PREFIX_TABLE ThisTable,
27  _Inout_ PRX_PREFIX_ENTRY ThisEntry,
28  _In_ PVOID Container,
29  _In_ PULONG ContainerRefCount,
30  _In_ USHORT CaseInsensitiveLength,
31  _In_ PRX_CONNECTION_ID ConnectionId);
32 
33 VOID
35  _Inout_ PRX_PREFIX_TABLE ThisTable,
37 
38 VOID
40  _Inout_ PRX_PREFIX_TABLE ThisTable,
42  _In_ BOOLEAN CaseInsensitiveMatch);
43 
44 typedef struct _RX_PREFIX_ENTRY
45 {
59 
60 #define RX_PREFIX_TABLE_DEFAULT_LENGTH 32
61 
62 typedef struct _RX_PREFIX_TABLE {
72 #if DBG
73  ULONG Lookups;
74  ULONG FailedLookups;
75  ULONG Considers;
76  ULONG Compares;
77 #endif
80 
81 #if (_WIN32_WINNT < 0x0600)
82 #define RxAcquirePrefixTableLockShared(T, W) RxpAcquirePrefixTableLockShared((T),(W),TRUE)
83 #define RxAcquirePrefixTableLockExclusive(T, W) RxpAcquirePrefixTableLockExclusive((T), (W), TRUE)
84 #define RxReleasePrefixTableLock(T) RxpReleasePrefixTableLock((T), TRUE)
85 
86 BOOLEAN
90  _In_ BOOLEAN ProcessBufferingStateChangeRequests);
91 
92 BOOLEAN
96  _In_ BOOLEAN ProcessBufferingStateChangeRequests);
97 
98 VOID
101  _In_ BOOLEAN ProcessBufferingStateChangeRequests);
102 #else
103 #define RxAcquirePrefixTableLockShared(T, W) ExAcquireResourceSharedLite(&(T)->TableLock, (W))
104 #define RxAcquirePrefixTableLockExclusive(T, W) ExAcquireResourceExclusiveLite(&(T)->TableLock, (W))
105 #define RxReleasePrefixTableLock(T) ExReleaseResourceLite(&(T)->TableLock)
106 #endif
107 
108 VOID
111 
112 #define RxIsPrefixTableLockExclusive(T) ExIsResourceAcquiredExclusiveLite(&(T)->TableLock)
113 #define RxIsPrefixTableLockAcquired(T) (ExIsResourceAcquiredSharedLite(&(T)->TableLock) || \
114  ExIsResourceAcquiredExclusiveLite(&(T)->TableLock))
115 
116 #ifdef __REACTOS__
117 #define HASH_BUCKET(T, H) &(T)->HashBuckets[H % (T)->TableSize]
118 #endif
119 
120 #endif
USHORT Spare1
Definition: prefix.h:49
BOOLEAN RxpAcquirePrefixTableLockShared(_In_ PRX_PREFIX_TABLE pTable, _In_ BOOLEAN Wait, _In_ BOOLEAN ProcessBufferingStateChangeRequests)
ASMGENDATA Table[]
Definition: genincdata.c:61
struct _RX_CONNECTION_ID * PRX_CONNECTION_ID
ULONG SessionID
Definition: prefix.h:8
struct _RX_CONNECTION_ID RX_CONNECTION_ID
ULONG TableSize
Definition: prefix.h:71
#define RX_PREFIX_TABLE_DEFAULT_LENGTH
Definition: prefix.h:60
CSHORT NODE_BYTE_SIZE
Definition: nodetype.h:37
NODE_BYTE_SIZE NodeByteSize
Definition: prefix.h:47
LIST_ENTRY HashLinks
Definition: prefix.h:51
#define _In_opt_
Definition: no_sal2.h:213
BOOLEAN CaseInsensitiveMatch
Definition: prefix.h:69
struct _RX_PREFIX_TABLE RX_PREFIX_TABLE
VOID RxInitializePrefixTable(_Inout_ PRX_PREFIX_TABLE ThisTable, _In_opt_ ULONG TableSize, _In_ BOOLEAN CaseInsensitiveMatch)
LIST_ENTRY MemberQueue
Definition: prefix.h:66
ULONG Version
Definition: prefix.h:65
BOOLEAN RxpAcquirePrefixTableLockExclusive(_In_ PRX_PREFIX_TABLE pTable, _In_ BOOLEAN Wait, _In_ BOOLEAN ProcessBufferingStateChangeRequests)
unsigned char BOOLEAN
ULONG SavedHashValue
Definition: prefix.h:50
PRX_PREFIX_ENTRY TableEntryForNull
Definition: prefix.h:68
#define _Out_
Definition: no_sal2.h:323
NODE_TYPE_CODE NodeTypeCode
Definition: prefix.h:63
VOID RxRemovePrefixTableEntry(_Inout_ PRX_PREFIX_TABLE ThisTable, _Inout_ PRX_PREFIX_ENTRY Entry)
VOID RxExclusivePrefixTableLockToShared(_In_ PRX_PREFIX_TABLE Table)
NODE_BYTE_SIZE NodeByteSize
Definition: prefix.h:64
VOID RxpReleasePrefixTableLock(_In_ PRX_PREFIX_TABLE pTable, _In_ BOOLEAN ProcessBufferingStateChangeRequests)
PVOID ContainingRecord
Definition: prefix.h:55
LIST_ENTRY HashBuckets[RX_PREFIX_TABLE_DEFAULT_LENGTH]
Definition: prefix.h:78
LIST_ENTRY MemberQLinks
Definition: prefix.h:52
PRX_PREFIX_ENTRY RxPrefixTableInsertName(_Inout_ PRX_PREFIX_TABLE ThisTable, _Inout_ PRX_PREFIX_ENTRY ThisEntry, _In_ PVOID Container, _In_ PULONG ContainerRefCount, _In_ USHORT CaseInsensitiveLength, _In_ PRX_CONNECTION_ID ConnectionId)
PVOID RxPrefixTableLookupName(_In_ PRX_PREFIX_TABLE ThisTable, _In_ PUNICODE_STRING CanonicalName, _Out_ PUNICODE_STRING RemainingName, _In_ PRX_CONNECTION_ID ConnectionId)
struct _RX_PREFIX_ENTRY RX_PREFIX_ENTRY
#define _Inout_
Definition: no_sal2.h:244
RX_CONNECTION_ID ConnectionId
Definition: prefix.h:57
struct _RX_PREFIX_ENTRY * PRX_PREFIX_ENTRY
Definition: typedefs.h:118
#define _In_
Definition: no_sal2.h:204
ERESOURCE TableLock
Definition: prefix.h:67
struct _RX_PREFIX_TABLE * PRX_PREFIX_TABLE
unsigned short USHORT
Definition: pedump.c:61
PVOID Context
Definition: prefix.h:56
unsigned int * PULONG
Definition: retypes.h:1
BOOLEAN IsNetNameTable
Definition: prefix.h:70
NODE_TYPE_CODE NodeTypeCode
Definition: prefix.h:46
_Must_inspect_result_ typedef _Out_ PULONG TableSize
Definition: iotypes.h:3971
ULONG ERESOURCE
Definition: env_spec_w32.h:594
unsigned int ULONG
Definition: retypes.h:1
static const EHCI_PERIOD pTable[]
Definition: usbehci.c:29
PULONG ContainerRefCount
Definition: prefix.h:54
USHORT NODE_TYPE_CODE
Definition: nodetype.h:22
ULONG RxTableComputeHashValue(_In_ PUNICODE_STRING Name)
USHORT CaseInsensitiveLength
Definition: prefix.h:48
Definition: prefix.h:44
base of all file and directory entries
Definition: entries.h:82
UNICODE_STRING Prefix
Definition: prefix.h:53
IN BOOLEAN Wait
Definition: fatprocs.h:1529
_Inout_ PFCB _Inout_ PUNICODE_STRING RemainingName
Definition: cdprocs.h:806