Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(596)

Unified Diff: runtime/vm/atomic_win.h

Issue 1644223003: Fix build break. (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Created 4 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/vm/atomic_win.h
diff --git a/runtime/vm/atomic_win.h b/runtime/vm/atomic_win.h
index 4172ec443c4a1d1a190252872f1b83b2f3647941..33b7b10ddb3c35cf5142875693bb9882433ae3d1 100644
--- a/runtime/vm/atomic_win.h
+++ b/runtime/vm/atomic_win.h
@@ -28,14 +28,14 @@ inline uintptr_t AtomicOperations::FetchAndIncrement(uintptr_t* p) {
}
-inline intptr_t AtomicOperations::FetchAndIncrementBy(intptr_t* p,
- intptr_t value) {
+inline uintptr_t AtomicOperations::FetchAndIncrementBy(intptr_t* p,
+ intptr_t value) {
#if defined(HOST_ARCH_X64)
- return static_cast<intptr_t>(
+ return static_cast<uintptr_t>(
InterlockedAdd64(reinterpret_cast<LONGLONG*>(p),
static_cast<LONGLONG>(value))) - value;
#elif defined(HOST_ARCH_IA32)
- return static_cast<intptr_t>(
+ return static_cast<uintptr_t>(
InterlockedAdd(reinterpret_cast<LONG*>(p),
static_cast<LONGLONG>(value))) - value;
#else
@@ -57,14 +57,14 @@ inline uintptr_t AtomicOperations::FetchAndDecrement(uintptr_t* p) {
}
-inline intptr_t AtomicOperations::FetchAndDecrementBy(intptr_t* p,
- intptr_t value) {
+inline uintptr_t AtomicOperations::FetchAndDecrementBy(intptr_t* p,
+ intptr_t value) {
#if defined(HOST_ARCH_X64)
- return static_cast<intptr_t>(
+ return static_cast<uintptr_t>(
InterlockedAdd64(reinterpret_cast<LONGLONG*>(p),
static_cast<LONGLONG>(-value))) + value;
#elif defined(HOST_ARCH_IA32)
- return static_cast<intptr_t>(
+ return static_cast<uintptr_t>(
InterlockedAdd(reinterpret_cast<LONG*>(p),
static_cast<LONGLONG>(-value))) + value;
#else
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698