mirror of
https://github.com/boostorg/thread.git
synced 2026-01-27 19:32:11 +00:00
Fixed errors and warnings for gcc. Still some outstanding issues for gcc on Win32.
[SVN r11386]
This commit is contained in:
@@ -89,7 +89,7 @@ void try_mutex::do_lock()
|
||||
|
||||
bool try_mutex::do_trylock()
|
||||
{
|
||||
int res = 0;
|
||||
unsigned int res = 0;
|
||||
res = WaitForSingleObject(reinterpret_cast<HANDLE>(m_mutex), 0);
|
||||
assert(res != WAIT_FAILED && res != WAIT_ABANDONED);
|
||||
return res == WAIT_OBJECT_0;
|
||||
@@ -135,7 +135,7 @@ void timed_mutex::do_lock()
|
||||
|
||||
bool timed_mutex::do_trylock()
|
||||
{
|
||||
int res = 0;
|
||||
unsigned int res = 0;
|
||||
res = WaitForSingleObject(reinterpret_cast<HANDLE>(m_mutex), 0);
|
||||
assert(res != WAIT_FAILED && res != WAIT_ABANDONED);
|
||||
return res == WAIT_OBJECT_0;
|
||||
@@ -146,7 +146,7 @@ bool timed_mutex::do_timedlock(const xtime& xt)
|
||||
unsigned milliseconds;
|
||||
to_duration(xt, milliseconds);
|
||||
|
||||
int res = WaitForSingleObject(reinterpret_cast<HANDLE>(m_mutex), milliseconds);
|
||||
unsigned int res = WaitForSingleObject(reinterpret_cast<HANDLE>(m_mutex), milliseconds);
|
||||
assert(res != WAIT_FAILED && res != WAIT_ABANDONED);
|
||||
return res == WAIT_OBJECT_0;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user