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,
/* RUNDOWN *******************************************************************/
+FORCEINLINE
+PEX_RUNDOWN_REF
+ExGetRunRefForGivenProcessor(IN PEX_RUNDOWN_REF_CACHE_AWARE RunRefCacheAware,
+ IN ULONG ProcNumber)
+{
+ return (PEX_RUNDOWN_REF)((ULONG_PTR)RunRefCacheAware->RunRefs +
+ RunRefCacheAware->RunRefSize *
+ (ProcNumber % RunRefCacheAware->Number));
+}
+
/*++
* @name ExfAcquireRundownProtection
* INTERNAL MACRO