OSDN Git Service

* config/posix/rwlock.cc (gtm_rwlock::write_lock_generic): Fix
[pf3gnuchains/gcc-fork.git] / libitm / config / posix / rwlock.cc
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++;
        }