posix-threads.cc (ParkHelper::unpark): Do not initialise result, but assign it instead.
* posix-threads.cc (ParkHelper::unpark): Do not initialise result, but assign it instead. Eliminates an unused variable warning when the result == 0 assertion is disabled. From-SVN: r154670
This commit is contained in:
parent
0fac515143
commit
5d6b1baca0
@ -1,3 +1,9 @@
|
|||||||
|
2009-11-26 Ben Elliston <bje@au.ibm.com>
|
||||||
|
|
||||||
|
* posix-threads.cc (ParkHelper::unpark): Do not initialise result,
|
||||||
|
but assign it instead. Eliminates an unused variable warning when
|
||||||
|
the result == 0 assertion is disabled.
|
||||||
|
|
||||||
2009-11-17 Andrew Haley <aph@redhat.com>
|
2009-11-17 Andrew Haley <aph@redhat.com>
|
||||||
|
|
||||||
* posix-threads.cc (park): Rewrite code to handle time.
|
* posix-threads.cc (park): Rewrite code to handle time.
|
||||||
|
@ -365,8 +365,9 @@ ParkHelper::unpark ()
|
|||||||
if (compare_and_swap
|
if (compare_and_swap
|
||||||
(ptr, Thread::THREAD_PARK_PARKED, Thread::THREAD_PARK_RUNNING))
|
(ptr, Thread::THREAD_PARK_PARKED, Thread::THREAD_PARK_RUNNING))
|
||||||
{
|
{
|
||||||
|
int result;
|
||||||
pthread_mutex_lock (&mutex);
|
pthread_mutex_lock (&mutex);
|
||||||
int result = pthread_cond_signal (&cond);
|
result = pthread_cond_signal (&cond);
|
||||||
pthread_mutex_unlock (&mutex);
|
pthread_mutex_unlock (&mutex);
|
||||||
JvAssert (result == 0);
|
JvAssert (result == 0);
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user