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:
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user