diff options
author | Ian Rogers <irogers@google.com> | 2014-05-20 16:40:37 -0700 |
---|---|---|
committer | Ian Rogers <irogers@google.com> | 2014-05-20 21:17:03 -0700 |
commit | 3e5cf305db800b2989ad57b7cde8fb3cc9fa1b9e (patch) | |
tree | 52a737323ebd505cf37ca0e4b2dcee6524fba07f /runtime/base/mutex-inl.h | |
parent | 27a2b70f612af9afc0fb5392fb10059f6a0a3569 (diff) | |
download | art-3e5cf305db800b2989ad57b7cde8fb3cc9fa1b9e.tar.gz art-3e5cf305db800b2989ad57b7cde8fb3cc9fa1b9e.tar.bz2 art-3e5cf305db800b2989ad57b7cde8fb3cc9fa1b9e.zip |
Begin migration of art::Atomic to std::atomic.
Change-Id: I4858d9cbed95e5ca560956b9dabd976cebe68333
Diffstat (limited to 'runtime/base/mutex-inl.h')
-rw-r--r-- | runtime/base/mutex-inl.h | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/runtime/base/mutex-inl.h b/runtime/base/mutex-inl.h index a7e25cb90..adf4c66aa 100644 --- a/runtime/base/mutex-inl.h +++ b/runtime/base/mutex-inl.h @@ -221,7 +221,7 @@ inline void ReaderWriterMutex::SharedUnlock(Thread* self) { // Reduce state by 1. done = android_atomic_release_cas(cur_state, cur_state - 1, &state_) == 0; if (done && (cur_state - 1) == 0) { // cas may fail due to noise? - if (num_pending_writers_ > 0 || num_pending_readers_ > 0) { + if (num_pending_writers_.LoadRelaxed() > 0 || num_pending_readers_ > 0) { // Wake any exclusive waiters as there are now no readers. futex(&state_, FUTEX_WAKE, -1, NULL, NULL, 0); } |