https://git.reactos.org/?p=reactos.git;a=commitdiff;h=7ed17cd71406eac9f37a23...
commit 7ed17cd71406eac9f37a231b6322a9d5060b6574 Author: Pierre Schweitzer pierre@reactos.org AuthorDate: Sat Nov 17 16:41:09 2018 +0100 Commit: Pierre Schweitzer pierre@reactos.org CommitDate: Sat Nov 17 16:44:37 2018 +0100
[NTOSKRNL] Implement ExfReInitializeRundownProtectionCacheAware()
We're done with cache-aware rundown protections! --- ntoskrnl/ex/rundown.c | 25 ++++++++++++++++++++----- 1 file changed, 20 insertions(+), 5 deletions(-)
diff --git a/ntoskrnl/ex/rundown.c b/ntoskrnl/ex/rundown.c index 240d599703..00e2c3b772 100644 --- a/ntoskrnl/ex/rundown.c +++ b/ntoskrnl/ex/rundown.c @@ -376,8 +376,6 @@ ExfWaitForRundownProtectionRelease(IN PEX_RUNDOWN_REF RunRef) ASSERT(WaitBlock.Count == 0); }
-/* FIXME: STUBS **************************************************************/ - /* * @implemented NT5.2 */ @@ -529,14 +527,31 @@ ExfRundownCompletedCacheAware(IN PEX_RUNDOWN_REF_CACHE_AWARE RunRefCacheAware) }
/* - * @unimplemented NT5.2 + * @implemented NT5.2 */ VOID FASTCALL ExfReInitializeRundownProtectionCacheAware(IN PEX_RUNDOWN_REF_CACHE_AWARE RunRefCacheAware) { - DBG_UNREFERENCED_PARAMETER(RunRefCacheAware); - UNIMPLEMENTED; + PEX_RUNDOWN_REF RunRef; + ULONG ProcCount, Current; + + ProcCount = RunRefCacheAware->Number; + /* No proc, nothing to do */ + if (ProcCount == 0) + { + return; + } + + /* We will mark all our runrefs inactive */ + for (Current = 0; Current < ProcCount; ++Current) + { + /* Get the runref for the proc */ + RunRef = ExGetRunRefForGivenProcessor(RunRefCacheAware, Current); + ASSERT((RunRef->Count & EX_RUNDOWN_ACTIVE) != 0); + + ExpSetRundown(RunRef, 0); + } }
/*