mirror of
https://github.com/reactos/reactos.git
synced 2024-09-30 22:47:28 +00:00
[NTOSKRNL] Implement ExGetRunRefForCurrentProcessor() to get runref for a proc
This commit is contained in:
parent
7e36e76d5d
commit
010b9b5469
|
@ -545,6 +545,15 @@ ExGetCountFastReference(IN EX_FAST_REF FastRef)
|
||||||
return (ULONG)FastRef.RefCnt;
|
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
|
FORCEINLINE
|
||||||
VOID
|
VOID
|
||||||
ExInitializeFastReference(OUT PEX_FAST_REF FastRef,
|
ExInitializeFastReference(OUT PEX_FAST_REF FastRef,
|
||||||
|
|
Loading…
Reference in a new issue