https://git.reactos.org/?p=reactos.git;a=commitdiff;h=05cca6444806751f294e8…
commit 05cca6444806751f294e8a82c24190762cbd056c
Author: Pierre Schweitzer <pierre(a)reactos.org>
AuthorDate: Sat Nov 17 16:38:36 2018 +0100
Commit: Pierre Schweitzer <pierre(a)reactos.org>
CommitDate: Sat Nov 17 16:44:37 2018 +0100
[NTOSKRNL] Implement ExfRundownCompletedCacheAware()
---
ntoskrnl/ex/rundown.c | 23 ++++++++++++++++++++---
1 file changed, 20 insertions(+), 3 deletions(-)
diff --git a/ntoskrnl/ex/rundown.c b/ntoskrnl/ex/rundown.c
index 95ca8afbf5..240d599703 100644
--- a/ntoskrnl/ex/rundown.c
+++ b/ntoskrnl/ex/rundown.c
@@ -501,14 +501,31 @@ ExfWaitForRundownProtectionReleaseCacheAware(IN
PEX_RUNDOWN_REF_CACHE_AWARE RunR
}
/*
- * @unimplemented NT5.2
+ * @implemented NT5.2
*/
VOID
FASTCALL
ExfRundownCompletedCacheAware(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 active */
+ 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, EX_RUNDOWN_ACTIVE);
+ }
}
/*