| Index: runtime/vm/lockers.cc
|
| diff --git a/runtime/vm/lockers.cc b/runtime/vm/lockers.cc
|
| index 2efe2458b927339fe57752d3eb575565b2f39198..b8ac4b64c84f27ce4180e057526fd77f9ac2d8fc 100644
|
| --- a/runtime/vm/lockers.cc
|
| +++ b/runtime/vm/lockers.cc
|
| @@ -12,11 +12,11 @@ namespace dart {
|
| static void updateThreadState(Thread* thread) {
|
| // First try a fast update of the thread state to indicate it is not at a
|
| // safepoint anymore.
|
| - uword old_state = Thread::SetAtSafepoint(true, 0);
|
| + uint32_t old_state = Thread::SetAtSafepoint(true, 0);
|
| uword addr =
|
| reinterpret_cast<uword>(thread) + Thread::safepoint_state_offset();
|
| - if (AtomicOperations::CompareAndSwapWord(
|
| - reinterpret_cast<uword*>(addr), old_state, 0) != old_state) {
|
| + if (AtomicOperations::CompareAndSwapUint32(
|
| + reinterpret_cast<uint32_t*>(addr), old_state, 0) != old_state) {
|
| // Fast update failed which means we could potentially be in the middle
|
| // of a safepoint operation and need to block for it.
|
| SafepointHandler* handler = thread->isolate()->safepoint_handler();
|
| @@ -34,11 +34,11 @@ Monitor::WaitResult MonitorLocker::WaitWithSafepointCheck(Thread* thread,
|
| Monitor::WaitResult result = monitor_->Wait(millis);
|
| // First try a fast update of the thread state to indicate it is not at a
|
| // safepoint anymore.
|
| - uword old_state = Thread::SetAtSafepoint(true, 0);
|
| + uint32_t old_state = Thread::SetAtSafepoint(true, 0);
|
| uword addr =
|
| reinterpret_cast<uword>(thread) + Thread::safepoint_state_offset();
|
| - if (AtomicOperations::CompareAndSwapWord(
|
| - reinterpret_cast<uword*>(addr), old_state, 0) != old_state) {
|
| + if (AtomicOperations::CompareAndSwapUint32(
|
| + reinterpret_cast<uint32_t*>(addr), old_state, 0) != old_state) {
|
| // Fast update failed which means we could potentially be in the middle
|
| // of a safepoint operation and need to block for it.
|
| monitor_->Exit();
|
| @@ -98,11 +98,11 @@ Monitor::WaitResult SafepointMonitorLocker::Wait(int64_t millis) {
|
| Monitor::WaitResult result = monitor_->Wait(millis);
|
| // First try a fast update of the thread state to indicate it is not at a
|
| // safepoint anymore.
|
| - uword old_state = Thread::SetAtSafepoint(true, 0);
|
| + uint32_t old_state = Thread::SetAtSafepoint(true, 0);
|
| uword addr =
|
| reinterpret_cast<uword>(thread) + Thread::safepoint_state_offset();
|
| - if (AtomicOperations::CompareAndSwapWord(
|
| - reinterpret_cast<uword*>(addr), old_state, 0) != old_state) {
|
| + if (AtomicOperations::CompareAndSwapUint32(
|
| + reinterpret_cast<uint32_t*>(addr), old_state, 0) != old_state) {
|
| // Fast update failed which means we could potentially be in the middle
|
| // of a safepoint operation and need to block for it.
|
| monitor_->Exit();
|
|
|