Source code of Windows XP (NT5)
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 

45 lines
624 B

#include "stdafx.h"
CRITICAL_SECTION g_STLCs;
BOOL g_STLCsInitialized = FALSE;
bool InitCompilerLibrary()
{
if ( !InitializeCriticalSectionAndSpinCount( &g_STLCs, 0x80000000 ) )
return false;
g_STLCsInitialized = TRUE;
return true;
}
bool UninitCompilerLibrary()
{
if ( g_STLCsInitialized )
{
DeleteCriticalSection( &g_STLCs );
g_STLCsInitialized = FALSE;
}
return true;
}
#if 1
#pragma warning( disable : 4273 )
std::_Lockit::_Lockit()
{
EnterCriticalSection(&g_STLCs);
}
std::_Lockit::~_Lockit()
{
LeaveCriticalSection(&g_STLCs);
}
#endif