#ifndef _NTRTL_H
/**
* The RtlInitializeCriticalSectionEx routine initializes a critical section object and sets the spin count for the critical section with flags.
*
* \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.
* \param Flags This parameter can be 0 or the CRITICAL_SECTION_NO_DEBUG_INFO flag.
* \sa https://learn.microsoft.com/en-us/windows/win32/api/synchapi/nf-synchapi-initializecriticalsectionex
*/
NTSYSAPI
NTSTATUS
NTAPI
RtlInitializeCriticalSectionEx(
_Out_ PRTL_CRITICAL_SECTION CriticalSection,
_In_ ULONG SpinCount,
_In_ ULONG Flags
);
View code on GitHubInitializes a critical section object with extended options.
InitializeCriticalSectionEx is a thin wrapper around this function.