summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorrth <rth@138bc75d-0d04-0410-961f-82ee72b054a4>2011-12-13 20:10:36 +0000
committerrth <rth@138bc75d-0d04-0410-961f-82ee72b054a4>2011-12-13 20:10:36 +0000
commit0fb24c9301b14d80a3358253cbe04aa908b20007 (patch)
treeaa1ae8558fc24b547193b7ff868195bd8bd45526
parent346dc3449dca9b7369b6bc548fb572c72377b36f (diff)
downloadgcc-0fb24c9301b14d80a3358253cbe04aa908b20007.tar.gz
* config/posix/rwlock.cc (gtm_rwlock::write_lock_generic): Fix
signed/unsigned comparison werror. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@182302 138bc75d-0d04-0410-961f-82ee72b054a4
-rw-r--r--libitm/ChangeLog3
-rw-r--r--libitm/config/posix/rwlock.cc2
2 files changed, 4 insertions, 1 deletions
diff --git a/libitm/ChangeLog b/libitm/ChangeLog
index cfb959dd05c..1b5966ecdbe 100644
--- a/libitm/ChangeLog
+++ b/libitm/ChangeLog
@@ -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.
diff --git a/libitm/config/posix/rwlock.cc b/libitm/config/posix/rwlock.cc
index e1e3dcf22d0..2464f041c5a 100644
--- a/libitm/config/posix/rwlock.cc
+++ b/libitm/config/posix/rwlock.cc
@@ -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++;
}