#ifndef _NTRTL_H
/**
* The RtlSetCriticalSectionSpinCount routine sets the spin count for a critical section object.
*
* \param CriticalSection A pointer to the critical section object.
* \param SpinCount The spin count for the critical section object.
* \return The previous spin count for the critical section object.
* \remarks Returns the previous effective low-24-bit spin count. Processor count and runtime policy can normalize the requested value; this does not change lock ownership or recursion.
*/
NTSYSAPI
ULONG
NTAPI
RtlSetCriticalSectionSpinCount(
_Inout_ PRTL_CRITICAL_SECTION CriticalSection,
_In_ ULONG SpinCount
);
View code on GitHubSets the specified spin count for the provided critical section object.
SetCriticalSectionSpinCount maps directly to this function.