RtlSetCriticalSectionSpinCount - NtDoc

Native API online documentation, based on the System Informer (formerly Process Hacker) phnt headers
#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
    );

#endif

View code on GitHub

NtDoc

Sets the specified spin count for the provided critical section object.

Related Win32 API

SetCriticalSectionSpinCount maps directly to this function.

See also