OSDN Git Service

* config/posix/rwlock.cc (gtm_rwlock::write_lock_generic): Fix
authorrth <rth@138bc75d-0d04-0410-961f-82ee72b054a4>
Tue, 13 Dec 2011 20:10:36 +0000 (20:10 +0000)
committerrth <rth@138bc75d-0d04-0410-961f-82ee72b054a4>
Tue, 13 Dec 2011 20:10:36 +0000 (20:10 +0000)
        signed/unsigned comparison werror.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@182302 138bc75d-0d04-0410-961f-82ee72b054a4

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

index cfb959d..1b5966e 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 e1e3dcf..2464f04 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++;
        }