mirror of
https://github.com/reactos/reactos.git
synced 2024-07-03 03:04:22 +00:00
[CSRSRV]
Use symbolic constant for number of hash buckets and use it where appropriate (fixing one missing location). svn path=/trunk/; revision=59592
This commit is contained in:
parent
1a7d645928
commit
6320fe5192
|
@ -45,7 +45,8 @@ extern HANDLE hBootstrapOk;
|
|||
extern HANDLE CsrApiPort;
|
||||
extern HANDLE CsrSmApiPort;
|
||||
extern HANDLE CsrSbApiPort;
|
||||
extern LIST_ENTRY CsrThreadHashTable[257];
|
||||
#define NUMBER_THREAD_HASH_BUCKETS 257
|
||||
extern LIST_ENTRY CsrThreadHashTable[NUMBER_THREAD_HASH_BUCKETS];
|
||||
extern PCSR_PROCESS CsrRootProcess;
|
||||
extern UNICODE_STRING CsrDirectoryName;
|
||||
extern ULONG CsrDebug;
|
||||
|
|
|
@ -371,7 +371,7 @@ CsrInitializeProcessStructure(VOID)
|
|||
CsrRootProcess->ClientId = NtCurrentTeb()->ClientId;
|
||||
|
||||
/* Initialize the Thread Hash List */
|
||||
for (i = 0; i < 256; i++) InitializeListHead(&CsrThreadHashTable[i]);
|
||||
for (i = 0; i < NUMBER_THREAD_HASH_BUCKETS; i++) InitializeListHead(&CsrThreadHashTable[i]);
|
||||
|
||||
/* Initialize the Wait Lock */
|
||||
return RtlInitializeCriticalSection(&CsrWaitListsLock);
|
||||
|
|
|
@ -14,11 +14,11 @@
|
|||
#define NDEBUG
|
||||
#include <debug.h>
|
||||
|
||||
#define CsrHashThread(t) (HandleToUlong(t) % 257)
|
||||
#define CsrHashThread(t) (HandleToUlong(t) % NUMBER_THREAD_HASH_BUCKETS)
|
||||
|
||||
/* GLOBALS ********************************************************************/
|
||||
|
||||
LIST_ENTRY CsrThreadHashTable[257];
|
||||
LIST_ENTRY CsrThreadHashTable[NUMBER_THREAD_HASH_BUCKETS];
|
||||
|
||||
|
||||
/* PRIVATE FUNCTIONS **********************************************************/
|
||||
|
|
Loading…
Reference in a new issue