rwlock.cc (gtm_rwlock::write_lock_generic): Fix signed/unsigned comparison werror.

* config/posix/rwlock.cc (gtm_rwlock::write_lock_generic): Fix
        signed/unsigned comparison werror.

From-SVN: r182302
This commit is contained in:
Richard Henderson 2011-12-13 12:10:36 -08:00 committed by Richard Henderson
parent b826bea7f3
commit 5d9d05d349
2 changed files with 4 additions and 1 deletions

View File

@ -1,5 +1,8 @@
2011-12-13 Richard Henderson <rth@redhat.com>
* config/posix/rwlock.cc (gtm_rwlock::write_lock_generic): Fix
signed/unsigned comparison werror.
* local_atomic: New file.
* libitm_i.h: Include it.
(gtm_thread::shared_state): Use atomic template.

View File

@ -193,7 +193,7 @@ gtm_rwlock::write_lock_generic (gtm_thread *tx)
it = it->next_thread)
{
// Don't count ourself if this is an upgrade.
if (it->shared_state.load(memory_order_relaxed) != -1)
if (it->shared_state.load(memory_order_relaxed) != (gtm_word)-1)
readers++;
}