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

Side by Side Diff: runtime/vm/atomic.h

Issue 2344193002: Make NoReloadScope thread safe (Closed)
Patch Set: Created 4 years, 3 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 unified diff | Download patch
« no previous file with comments | « no previous file | runtime/vm/isolate.h » ('j') | runtime/vm/isolate.h » ('J')
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file
2 // for details. All rights reserved. Use of this source code is governed by a 2 // for details. All rights reserved. Use of this source code is governed by a
3 // BSD-style license that can be found in the LICENSE file. 3 // BSD-style license that can be found in the LICENSE file.
4 4
5 #ifndef VM_ATOMIC_H_ 5 #ifndef VM_ATOMIC_H_
6 #define VM_ATOMIC_H_ 6 #define VM_ATOMIC_H_
7 7
8 #include "platform/globals.h" 8 #include "platform/globals.h"
9 9
10 #include "vm/allocation.h" 10 #include "vm/allocation.h"
(...skipping 16 matching lines...) Expand all
27 // that are accessed by generated code. 27 // that are accessed by generated code.
28 static void IncrementBy(intptr_t* p, intptr_t value); 28 static void IncrementBy(intptr_t* p, intptr_t value);
29 static void IncrementInt64By(int64_t* p, int64_t value); 29 static void IncrementInt64By(int64_t* p, int64_t value);
30 30
31 // Atomically fetch the value at p and decrement the value at p. 31 // Atomically fetch the value at p and decrement the value at p.
32 // Returns the original value at p. 32 // Returns the original value at p.
33 // 33 //
34 // NOTE: Not to be used for any atomic operations involving memory locations 34 // NOTE: Not to be used for any atomic operations involving memory locations
35 // that are accessed by generated code. 35 // that are accessed by generated code.
36 static uintptr_t FetchAndDecrement(uintptr_t* p); 36 static uintptr_t FetchAndDecrement(uintptr_t* p);
37 static intptr_t FetchAndDecrement(intptr_t* p);
Florian Schneider 2016/09/16 16:22:41 Not needed? If we need both variants, I'd make thi
Cutch 2016/09/16 16:45:30 Oops. I meant to delete this.
37 38
38 // Atomically decrement the value at p by 'value'. 39 // Atomically decrement the value at p by 'value'.
39 // 40 //
40 // NOTE: Not to be used for any atomic operations involving memory locations 41 // NOTE: Not to be used for any atomic operations involving memory locations
41 // that are accessed by generated code. 42 // that are accessed by generated code.
42 static void DecrementBy(intptr_t* p, intptr_t value); 43 static void DecrementBy(intptr_t* p, intptr_t value);
43 44
44 // Atomically compare *ptr to old_value, and if equal, store new_value. 45 // Atomically compare *ptr to old_value, and if equal, store new_value.
45 // Returns the original value at ptr. 46 // Returns the original value at ptr.
46 // 47 //
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after
78 #include "vm/atomic_linux.h" 79 #include "vm/atomic_linux.h"
79 #elif defined(TARGET_OS_MACOS) 80 #elif defined(TARGET_OS_MACOS)
80 #include "vm/atomic_macos.h" 81 #include "vm/atomic_macos.h"
81 #elif defined(TARGET_OS_WINDOWS) 82 #elif defined(TARGET_OS_WINDOWS)
82 #include "vm/atomic_win.h" 83 #include "vm/atomic_win.h"
83 #else 84 #else
84 #error Unknown target os. 85 #error Unknown target os.
85 #endif 86 #endif
86 87
87 #endif // VM_ATOMIC_H_ 88 #endif // VM_ATOMIC_H_
OLDNEW
« no previous file with comments | « no previous file | runtime/vm/isolate.h » ('j') | runtime/vm/isolate.h » ('J')

Powered by Google App Engine
This is Rietveld 408576698