2
0
mirror of https://github.com/boostorg/thread.git synced 2026-01-27 07:22:11 +00:00

Thread: merge fixes for #8422, #8458, #8674.

[SVN r84750]
This commit is contained in:
Vicente J. Botet Escriba
2013-06-12 20:54:44 +00:00
parent 582649ed44
commit f4fb2c1ab0
4 changed files with 24 additions and 2 deletions

View File

@@ -318,6 +318,11 @@
#define BOOST_THREAD_USES_DATETIME
#endif
#if defined(BOOST_THREAD_PLATFORM_WIN32) && defined BOOST_THREAD_DONT_USE_CHRONO
#undef BOOST_THREAD_DONT_USE_CHRONO
#define BOOST_THREAD_USES_CHRONO
#endif
// BOOST_THREAD_PROVIDES_DEPRECATED_FEATURES_SINCE_V3_0_0 defined by default up to Boost 1.55
// BOOST_THREAD_DONT_PROVIDE_DEPRECATED_FEATURES_SINCE_V3_0_0 defined by default up to Boost 1.55
#if defined BOOST_THREAD_PROVIDES_DEPRECATED_FEATURES_SINCE_V3_0_0

View File

@@ -23,6 +23,17 @@
CLASS& operator=(CLASS const&) = delete;
#else // BOOST_NO_CXX11_DELETED_FUNCTIONS
#if defined(BOOST_MSVC)
#define BOOST_THREAD_DELETE_COPY_CTOR(CLASS) \
private: \
CLASS(CLASS const&); \
public:
#define BOOST_THREAD_DELETE_COPY_ASSIGN(CLASS) \
private: \
CLASS& operator=(CLASS const&); \
public:
#else
#define BOOST_THREAD_DELETE_COPY_CTOR(CLASS) \
private: \
CLASS(CLASS&); \
@@ -32,6 +43,7 @@
private: \
CLASS& operator=(CLASS&); \
public:
#endif
#endif // BOOST_NO_CXX11_DELETED_FUNCTIONS
/**

View File

@@ -81,8 +81,10 @@ namespace boost
do
{
BOOST_VERIFY(win32::WaitForSingleObject(
sem,::boost::detail::win32::infinite)==0);
unsigned const retval(win32::WaitForSingleObject(sem, ::boost::detail::win32::infinite));
BOOST_VERIFY(0 == retval || ::boost::detail::win32::wait_abandoned == retval);
// BOOST_VERIFY(win32::WaitForSingleObject(
// sem,::boost::detail::win32::infinite)==0);
clear_waiting_and_try_lock(old_count);
lock_acquired=!(old_count&lock_flag_value);
}

View File

@@ -44,6 +44,8 @@ namespace boost
handle const invalid_handle_value=INVALID_HANDLE_VALUE;
unsigned const event_modify_state=EVENT_MODIFY_STATE;
unsigned const synchronize=SYNCHRONIZE;
unsigned const wait_abandoned=WAIT_ABANDONED;
# ifdef BOOST_NO_ANSI_APIS
using ::CreateMutexW;
@@ -127,6 +129,7 @@ namespace boost
handle const invalid_handle_value=(handle)(-1);
unsigned const event_modify_state=2;
unsigned const synchronize=0x100000u;
unsigned const wait_abandoned=0x00000080u;
extern "C"
{