#ifndef _NTRTL_H
/**
* The RtlInitializeCriticalSectionAndSpinCount routine initializes a critical section object and sets the spin count for the critical section.
*
* \param CriticalSection A pointer to the critical section object.
* \param SpinCount The spin count for the critical section object. On single-processor systems, the spin count is ignored.
* \sa https://learn.microsoft.com/en-us/windows/win32/api/synchapi/nf-synchapi-initializecriticalsectionandspincount
*/
NTSYSAPI
NTSTATUS
NTAPI
RtlInitializeCriticalSectionAndSpinCount(
_Out_ PRTL_CRITICAL_SECTION CriticalSection,
_In_ ULONG SpinCount
);
View code on GitHubInitializes a critical section object with a specified spin count.
InitializeCriticalSectionAndSpinCount is a thin wrapper around this function.