rwlock.cc (gtm_rwlock::write_lock_generic): Fix signed/unsigned comparison werror.
authorRichard Henderson <rth@redhat.com>
Tue, 13 Dec 2011 20:10:36 +0000 (12:10 -0800)
committerRichard Henderson <rth@gcc.gnu.org>
Tue, 13 Dec 2011 20:10:36 +0000 (12:10 -0800)
        * config/posix/rwlock.cc (gtm_rwlock::write_lock_generic): Fix
        signed/unsigned comparison werror.

From-SVN: r182302

libitm/ChangeLog
libitm/config/posix/rwlock.cc

index cfb959dd05cb6c90dbe4d68241b61e6d2792a9d8..1b5966ecdbe1e84adaf145d83ee25a40a6b642f9 100644 (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.
index e1e3dcf22d06f84c071676679a4e6edefbc7a8e8..2464f041c5a10cbb1ad1b3617e2edbf7357f18bf 100644 (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++;
        }