summaryrefslogtreecommitdiffstats
path: root/runtime/lock_word-inl.h
diff options
context:
space:
mode:
authorIan Rogers <irogers@google.com>2014-01-23 17:01:01 -0800
committerIan Rogers <irogers@google.com>2014-01-23 17:01:23 -0800
commitc666ee8c75118d072bfd2a2b81b80915f6040593 (patch)
treef578f493024258ac25049033a793058447deccc5 /runtime/lock_word-inl.h
parent00807839c1c4ed4b5dae9f3727fd031e367e13f7 (diff)
downloadart-c666ee8c75118d072bfd2a2b81b80915f6040593.tar.gz
art-c666ee8c75118d072bfd2a2b81b80915f6040593.tar.bz2
art-c666ee8c75118d072bfd2a2b81b80915f6040593.zip
64bit monitors are forced to 32bit in lock words.
I expect this to change in the future but this at least unblocks building. Change-Id: I0baf3eb0e93f1e83d8f07947c1f24ba24249733c
Diffstat (limited to 'runtime/lock_word-inl.h')
-rw-r--r--runtime/lock_word-inl.h3
1 files changed, 2 insertions, 1 deletions
diff --git a/runtime/lock_word-inl.h b/runtime/lock_word-inl.h
index aea10c20f8..8b9a3cd954 100644
--- a/runtime/lock_word-inl.h
+++ b/runtime/lock_word-inl.h
@@ -46,7 +46,8 @@ inline LockWord::LockWord() : value_(0) {
}
inline LockWord::LockWord(Monitor* mon)
- : value_((reinterpret_cast<uint32_t>(mon) >> kStateSize) | (kStateFat << kStateShift)) {
+ : value_(((reinterpret_cast<uintptr_t>(mon) >> kStateSize) | (kStateFat << kStateShift)) &
+ 0xFFFFFFFFU) {
DCHECK_EQ(FatLockMonitor(), mon);
}