[NTOSKRNL] Implement ExSizeOfRundownProtectionCacheAware()

This commit is contained in:
Pierre Schweitzer 2018-11-17 15:03:43 +01:00
parent ce94d37dbe
commit 47d309b262
No known key found for this signature in database
GPG key ID: 7545556C3D585B0B

View file

@ -606,13 +606,28 @@ ExInitializeRundownProtectionCacheAware(IN PEX_RUNDOWN_REF_CACHE_AWARE RunRefCac
}
/*
* @unimplemented NT5.2
* @implemented NT5.2
*/
SIZE_T
NTAPI
ExSizeOfRundownProtectionCacheAware(VOID)
{
UNIMPLEMENTED;
return 0;
SIZE_T Size;
PAGED_CODE();
/* Compute the needed size for runrefs */
if (KeNumberProcessors <= 1)
{
Size = sizeof(EX_RUNDOWN_REF);
}
else
{
/* We +1, to have enough room for alignment */
Size = (KeNumberProcessors + 1) * KeGetRecommendedSharedDataAlignment();
}
/* Return total size (master structure and runrefs) */
return Size + sizeof(EX_RUNDOWN_REF_CACHE_AWARE);
}