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

Side by Side Diff: src/base/atomicops_internals_mips_gcc.h

Issue 316133002: Move atomic ops and related files to base library (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: updates Created 6 years, 6 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 | Annotate | Revision Log
« no previous file with comments | « src/base/atomicops_internals_mac.h ('k') | src/base/atomicops_internals_tsan.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2010 the V8 project authors. All rights reserved. 1 // Copyright 2010 the V8 project authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 // This file is an internal atomic implementation, use atomicops.h instead. 5 // This file is an internal atomic implementation, use atomicops.h instead.
6 6
7 #ifndef V8_ATOMICOPS_INTERNALS_MIPS_GCC_H_ 7 #ifndef V8_BASE_ATOMICOPS_INTERNALS_MIPS_GCC_H_
8 #define V8_ATOMICOPS_INTERNALS_MIPS_GCC_H_ 8 #define V8_BASE_ATOMICOPS_INTERNALS_MIPS_GCC_H_
9 9
10 namespace v8 { 10 namespace v8 {
11 namespace internal { 11 namespace base {
12 12
13 // Atomically execute: 13 // Atomically execute:
14 // result = *ptr; 14 // result = *ptr;
15 // if (*ptr == old_value) 15 // if (*ptr == old_value)
16 // *ptr = new_value; 16 // *ptr = new_value;
17 // return result; 17 // return result;
18 // 18 //
19 // I.e., replace "*ptr" with "new_value" if "*ptr" used to be "old_value". 19 // I.e., replace "*ptr" with "new_value" if "*ptr" used to be "old_value".
20 // Always return the old value of "*ptr" 20 // Always return the old value of "*ptr"
21 // 21 //
(...skipping 125 matching lines...) Expand 10 before | Expand all | Expand 10 after
147 Atomic32 value = *ptr; 147 Atomic32 value = *ptr;
148 MemoryBarrier(); 148 MemoryBarrier();
149 return value; 149 return value;
150 } 150 }
151 151
152 inline Atomic32 Release_Load(volatile const Atomic32* ptr) { 152 inline Atomic32 Release_Load(volatile const Atomic32* ptr) {
153 MemoryBarrier(); 153 MemoryBarrier();
154 return *ptr; 154 return *ptr;
155 } 155 }
156 156
157 } } // namespace v8::internal 157 } } // namespace v8::base
158 158
159 #endif // V8_ATOMICOPS_INTERNALS_MIPS_GCC_H_ 159 #endif // V8_BASE_ATOMICOPS_INTERNALS_MIPS_GCC_H_
OLDNEW
« no previous file with comments | « src/base/atomicops_internals_mac.h ('k') | src/base/atomicops_internals_tsan.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698