2
0
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:
William E. Kempf
2001-10-15 18:32:21 +00:00
parent c2e7091632
commit 7b07cb0759
6 changed files with 11 additions and 10 deletions

View File

@@ -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;
}