mirror of git://gcc.gnu.org/git/gcc.git
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:
parent
b826bea7f3
commit
5d9d05d349
|
@ -1,5 +1,8 @@
|
||||||
2011-12-13 Richard Henderson <rth@redhat.com>
|
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.
|
* local_atomic: New file.
|
||||||
* libitm_i.h: Include it.
|
* libitm_i.h: Include it.
|
||||||
(gtm_thread::shared_state): Use atomic template.
|
(gtm_thread::shared_state): Use atomic template.
|
||||||
|
|
|
@ -193,7 +193,7 @@ gtm_rwlock::write_lock_generic (gtm_thread *tx)
|
||||||
it = it->next_thread)
|
it = it->next_thread)
|
||||||
{
|
{
|
||||||
// Don't count ourself if this is an upgrade.
|
// 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++;
|
readers++;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue