|
Boost-Commit : |
Subject: [Boost-commit] svn:boost r49395 - sandbox/thread_safe_signals/trunk/boost/signals2/detail
From: fmhess_at_[hidden]
Date: 2008-10-19 23:27:36
Author: fmhess
Date: 2008-10-19 23:27:36 EDT (Sun, 19 Oct 2008)
New Revision: 49395
URL: http://svn.boost.org/trac/boost/changeset/49395
Log:
Fixed a compile warning and added missing declaration of
TryEnterCriticalSection when not using windows.h.
Text files modified:
sandbox/thread_safe_signals/trunk/boost/signals2/detail/lwm_win32_cs.hpp | 3 ++-
1 files changed, 2 insertions(+), 1 deletions(-)
Modified: sandbox/thread_safe_signals/trunk/boost/signals2/detail/lwm_win32_cs.hpp
==============================================================================
--- sandbox/thread_safe_signals/trunk/boost/signals2/detail/lwm_win32_cs.hpp (original)
+++ sandbox/thread_safe_signals/trunk/boost/signals2/detail/lwm_win32_cs.hpp 2008-10-19 23:27:36 EDT (Sun, 19 Oct 2008)
@@ -47,6 +47,7 @@
extern "C" __declspec(dllimport) void __stdcall InitializeCriticalSection(critical_section *);
extern "C" __declspec(dllimport) void __stdcall EnterCriticalSection(critical_section *);
+extern "C" __declspec(dllimport) bool __stdcall TryEnterCriticalSection(critical_section *);
extern "C" __declspec(dllimport) void __stdcall LeaveCriticalSection(critical_section *);
extern "C" __declspec(dllimport) void __stdcall DeleteCriticalSection(critical_section *);
@@ -85,7 +86,7 @@
#if defined(_WIN32_WINNT) && (_WIN32_WINNT >= 0x0400)
bool try_lock()
{
- return TryEnterCriticalSection(&cs_);
+ return TryEnterCriticalSection(&cs_) != 0;
}
#endif
void unlock()
Boost-Commit list run by bdawes at acm.org, david.abrahams at rcn.com, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk