2
0
mirror of https://github.com/boostorg/asio.git synced 2026-02-25 14:32:08 +00:00

WinCE doesn't provide InitializeCriticalSectionAndSpinCount.

[SVN r60722]
This commit is contained in:
Christopher Kohlhoff
2010-03-19 23:57:50 +00:00
parent b80ddc1935
commit e95406e8b9

View File

@@ -84,12 +84,20 @@ private:
#if defined(__MINGW32__)
// Not sure if MinGW supports structured exception handling, so for now
// we'll just call the Windows API and hope.
# if defined(UNDER_CE)
::InitializeCriticalSection(&crit_section_);
# else
::InitializeCriticalSectionAndSpinCount(&crit_section_, 0x80000000);
# endif
return 0;
#else
__try
{
# if defined(UNDER_CE)
::InitializeCriticalSection(&crit_section_);
# else
::InitializeCriticalSectionAndSpinCount(&crit_section_, 0x80000000);
# endif
}
__except(GetExceptionCode() == STATUS_NO_MEMORY
? EXCEPTION_EXECUTE_HANDLER : EXCEPTION_CONTINUE_SEARCH)