ReactOS 0.4.16-dev-336-gb667d82
|
#include <ntoskrnl.h>
#include <debug.h>
Go to the source code of this file.
Macros | |
#define | NDEBUG |
Variables | |
ULONG | CmpHashTableSize = 2048 |
PCM_KEY_HASH_TABLE_ENTRY | CmpCacheTable |
PCM_NAME_HASH_TABLE_ENTRY | CmpNameCacheTable |
#define NDEBUG |
Definition at line 12 of file cmkcbncb.c.
PULONG NTAPI CmpBuildAndLockKcbArray | ( | _In_ PCM_HASH_CACHE_STACK | HashCacheStack, |
_In_ ULONG | KcbLockFlags, | ||
_In_ PCM_KEY_CONTROL_BLOCK | Kcb, | ||
_Inout_ PULONG | OuterStackArray, | ||
_In_ ULONG | TotalRemainingSubkeys, | ||
_In_ ULONG | MatchRemainSubkeyLevel | ||
) |
Builds an array of KCBs and locks them. Whether these KCBs are locked exclusively or in shared mode by the calling thread, is specified by the KcbLockFlags parameter. The array is sorted.
[in] | HashCacheStack | A pointer to a hash cache stack. This stack parameter stores the convkey hashes of interested KCBs of a key path name that need to be locked. |
[in] | KcbLockFlags | Define a lock flag to lock the KCBs. Consult the CmpLockKcbArray documentation for more information. |
[in] | Kcb | A pointer to a key control block to be given. This KCB is included in the array for locking, that is, given by the CmpParseKey from the parser object. |
[in,out] | OuterStackArray | A pointer to an array that lives on the caller's stack. It acts like an auxiliary array used by the function to store the KCB elements for locking. The expected size of the array is up to 32 elements, which is the imposed limit by CMP_HASH_STACK_LIMIT. This limit also corresponds to the maximum depth of subkey levels. |
[in] | TotalRemainingSubkeys | The number of total remaining subkey levels. |
[in] | MatchRemainSubkeyLevel | The number of remaining subkey levels that match. |
Definition at line 1302 of file cmkcbncb.c.
Referenced by CmpBuildHashStackAndLookupCache(), and CmpLookInCache().
VOID NTAPI CmpCleanUpKcbCacheWithLock | ( | IN PCM_KEY_CONTROL_BLOCK | Kcb, |
IN BOOLEAN | LockHeldExclusively | ||
) |
Definition at line 476 of file cmkcbncb.c.
Referenced by _Function_class_(), CmpAddToDelayedClose(), CmpDereferenceKeyControlBlockWithLock(), CmpEnumerateOpenSubKeys(), and CmpLookInCache().
VOID NTAPI CmpCleanUpKcbValueCache | ( | IN PCM_KEY_CONTROL_BLOCK | Kcb | ) |
Definition at line 431 of file cmkcbncb.c.
Referenced by CmDeleteValueKey(), CmpCleanUpKcbCacheWithLock(), CmpCompareNewValueDataAgainstKCBCache(), CmpDoOpen(), and CmSetValueKey().
VOID NTAPI CmpCleanUpSubKeyInfo | ( | IN PCM_KEY_CONTROL_BLOCK | Kcb | ) |
Definition at line 517 of file cmkcbncb.c.
Referenced by CmDeleteKey(), CmpCreateLinkNode(), CmpDoCreate(), CmpEnumerateOpenSubKeys(), and CmUnloadKey().
PUNICODE_STRING NTAPI CmpConstructName | ( | IN PCM_KEY_CONTROL_BLOCK | Kcb | ) |
Definition at line 897 of file cmkcbncb.c.
Referenced by CmpQueryKeyName().
PCM_KEY_CONTROL_BLOCK NTAPI CmpCreateKeyControlBlock | ( | IN PHHIVE | Hive, |
IN HCELL_INDEX | Index, | ||
IN PCM_KEY_NODE | Node, | ||
IN PCM_KEY_CONTROL_BLOCK | Parent, | ||
IN ULONG | Flags, | ||
IN PUNICODE_STRING | KeyName | ||
) |
Definition at line 655 of file cmkcbncb.c.
Referenced by CmpCreateRegistryRoot(), CmpDoCreateChild(), CmpDoOpen(), and CmpParseKey().
VOID NTAPI CmpDereferenceKeyControlBlock | ( | IN PCM_KEY_CONTROL_BLOCK | Kcb | ) |
Definition at line 571 of file cmkcbncb.c.
Referenced by CmpLookInCache(), and CmpParseKey().
VOID NTAPI CmpDereferenceKeyControlBlockWithLock | ( | IN PCM_KEY_CONTROL_BLOCK | Kcb, |
IN BOOLEAN | LockHeldExclusively | ||
) |
Definition at line 606 of file cmkcbncb.c.
Referenced by CmpCleanUpKcbCacheWithLock(), CmpCreateKeyControlBlock(), CmpDereferenceKeyControlBlock(), CmpDoOpen(), and CmpParseKey().
VOID NTAPI CmpDereferenceNameControlBlockWithLock | ( | IN PCM_NAME_CONTROL_BLOCK | Ncb | ) |
Definition at line 317 of file cmkcbncb.c.
Referenced by CmpCleanUpKcbCacheWithLock().
Definition at line 1368 of file cmkcbncb.c.
Referenced by CmDeleteKey(), CmpEnumerateOpenSubKeys(), and CmUnloadKey().
PCM_NAME_CONTROL_BLOCK NTAPI CmpGetNameControlBlock | ( | IN PUNICODE_STRING | NodeName | ) |
Definition at line 148 of file cmkcbncb.c.
Referenced by CmpCreateKeyControlBlock().
Definition at line 26 of file cmkcbncb.c.
Referenced by CmInitSystem1().
PCM_KEY_CONTROL_BLOCK NTAPI CmpInsertKeyHash | ( | IN PCM_KEY_HASH | KeyHash, |
IN BOOLEAN | IsFake | ||
) |
Definition at line 109 of file cmkcbncb.c.
Referenced by CmpCreateKeyControlBlock().
Locks a given number of KCBs.
[in] | KcbArray | A pointer to an array of KCBs to be locked. The count of KCBs to be locked is defined by the first element in the array. |
[in] | KcbLockFlags | Define a lock flag to lock the KCBs. |
CMP_LOCK_KCB_ARRAY_EXCLUSIVE – indicates the KCBs are locked exclusively and owned by the calling thread.
CMP_LOCK_KCB_ARRAY_SHARED – indicates the KCBs are locked in shared mode by the owning threads.
Definition at line 1177 of file cmkcbncb.c.
Referenced by CmpBuildAndLockKcbArray().
BOOLEAN NTAPI CmpReferenceKeyControlBlock | ( | IN PCM_KEY_CONTROL_BLOCK | Kcb | ) |
Definition at line 357 of file cmkcbncb.c.
Referenced by CmpBuildHashStackAndLookupCache(), CmpCreateKeyControlBlock(), CmpDoOpen(), and CmpLookInCache().
VOID NTAPI CmpRemoveKeyControlBlock | ( | IN PCM_KEY_CONTROL_BLOCK | Kcb | ) |
Definition at line 306 of file cmkcbncb.c.
Referenced by CmDeleteKey(), CmpCleanUpKcbCacheWithLock(), CmpCreateKeyControlBlock(), CmpDoCreate(), CmpEnumerateOpenSubKeys(), CmpLookInCache(), and CmUnloadKey().
VOID NTAPI CmpRemoveKeyHash | ( | IN PCM_KEY_HASH | KeyHash | ) |
Definition at line 78 of file cmkcbncb.c.
Referenced by CmpRemoveKeyControlBlock().
Sorts an array of KCB hashes in ascending order and removes any key indices that are duplicates. The purpose of sorting the KCB elements is to ensure consistent and proper locking order, so that we can prevent a deadlock.
[in,out] | KcbArray | A pointer to an array of KCBs of which the key indices are to be sorted. |
Definition at line 1211 of file cmkcbncb.c.
Referenced by CmpBuildAndLockKcbArray().
Unlocks a number of KCBs provided by a KCB array.
[in] | KcbArray | A pointer to an array of KCBs to be unlocked. |
Definition at line 1145 of file cmkcbncb.c.
Referenced by CmpDoOpen(), CmpLookInCache(), and CmpParseKey().
Definition at line 1100 of file cmkcbncb.c.
Referenced by CmpDeleteKeyObject().
Definition at line 1042 of file cmkcbncb.c.
Referenced by CmpCreateRegistryRoot(), CmpDoCreateChild(), and CmpDoOpen().
VOID NTAPI InitializeKCBKeyBodyList | ( | IN PCM_KEY_CONTROL_BLOCK | Kcb | ) |
Definition at line 641 of file cmkcbncb.c.
Referenced by CmpCreateKeyControlBlock().
PCM_KEY_HASH_TABLE_ENTRY CmpCacheTable |
Definition at line 18 of file cmkcbncb.c.
Referenced by CmpAcquireKcbLockExclusiveByIndex(), CmpEnumerateOpenSubKeys(), CmpInitializeCache(), CmpInsertKeyHash(), CmpLookInCache(), CmpReleaseKcbLockByIndex(), CmpReleaseTwoKcbLockByKey(), CmpRemoveKeyHash(), and CmpTryToConvertKcbSharedToExclusive().
ULONG CmpHashTableSize = 2048 |
Definition at line 17 of file cmkcbncb.c.
Referenced by CmpEnumerateOpenSubKeys(), and CmpInitializeCache().
PCM_NAME_HASH_TABLE_ENTRY CmpNameCacheTable |
Definition at line 19 of file cmkcbncb.c.
Referenced by CmpDereferenceNameControlBlockWithLock(), CmpGetNameControlBlock(), and CmpInitializeCache().