projects
/
reactos.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
7e36e76
)
[NTOSKRNL] Implement ExGetRunRefForCurrentProcessor() to get runref for a proc
author
Pierre Schweitzer
<pierre@reactos.org>
Sat, 17 Nov 2018 14:32:10 +0000
(15:32 +0100)
committer
Pierre Schweitzer
<pierre@reactos.org>
Sat, 17 Nov 2018 15:44:35 +0000
(16:44 +0100)
ntoskrnl/include/internal/ex.h
patch
|
blob
|
history
diff --git
a/ntoskrnl/include/internal/ex.h
b/ntoskrnl/include/internal/ex.h
index
a8e715a
..
e09eb9b
100644
(file)
--- a/
ntoskrnl/include/internal/ex.h
+++ b/
ntoskrnl/include/internal/ex.h
@@
-545,6
+545,15
@@
ExGetCountFastReference(IN EX_FAST_REF FastRef)
return (ULONG)FastRef.RefCnt;
}
+FORCEINLINE
+PEX_RUNDOWN_REF
+ExGetRunRefForCurrentProcessor(IN PEX_RUNDOWN_REF_CACHE_AWARE RunRefCacheAware)
+{
+ return (PEX_RUNDOWN_REF)((ULONG_PTR)RunRefCacheAware->RunRefs +
+ RunRefCacheAware->RunRefSize *
+ (KeGetCurrentProcessorNumber() % RunRefCacheAware->Number));
+}
+
FORCEINLINE
VOID
ExInitializeFastReference(OUT PEX_FAST_REF FastRef,