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

Side by Side Diff: skia/ext/SkThread_chrome.cc

Issue 13804003: Fix typo: s/Aquire/Acquire/ (Closed) Base URL: https://src.chromium.org/chrome/trunk/src/
Patch Set: Created 7 years, 8 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 | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium 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 #include "third_party/skia/include/core/SkThread.h" 5 #include "third_party/skia/include/core/SkThread.h"
6 6
7 #include <new> 7 #include <new>
8 8
9 #include "base/atomicops.h" 9 #include "base/atomicops.h"
10 #include "base/basictypes.h" 10 #include "base/basictypes.h"
(...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after
44 */ 44 */
45 int32_t sk_atomic_conditional_inc(int32_t* addr) { 45 int32_t sk_atomic_conditional_inc(int32_t* addr) {
46 int32_t value = *addr; 46 int32_t value = *addr;
47 47
48 while (true) { 48 while (true) {
49 if (value == 0) { 49 if (value == 0) {
50 return 0; 50 return 0;
51 } 51 }
52 52
53 int32_t before; 53 int32_t before;
54 before = base::subtle::Aquire_CompareAndSwap(addr, value, value + 1); 54 before = base::subtle::Acquire_CompareAndSwap(addr, value, value + 1);
55 55
56 if (before == value) { 56 if (before == value) {
57 return value; 57 return value;
58 } else { 58 } else {
59 value = before; 59 value = before;
60 } 60 }
61 } 61 }
62 } 62 }
63 /** If sk_atomic_conditional_inc does not act as an aquire (L/SL) barrier, this 63 /** If sk_atomic_conditional_inc does not act as an aquire (L/SL) barrier, this
64 is expected to act as an aquire (L/SL) memory barrier and as a compiler 64 is expected to act as an aquire (L/SL) memory barrier and as a compiler
(...skipping 14 matching lines...) Expand all
79 79
80 void SkMutex::acquire() { 80 void SkMutex::acquire() {
81 base::Lock* lock = reinterpret_cast<base::Lock*>(fStorage); 81 base::Lock* lock = reinterpret_cast<base::Lock*>(fStorage);
82 lock->Acquire(); 82 lock->Acquire();
83 } 83 }
84 84
85 void SkMutex::release() { 85 void SkMutex::release() {
86 base::Lock* lock = reinterpret_cast<base::Lock*>(fStorage); 86 base::Lock* lock = reinterpret_cast<base::Lock*>(fStorage);
87 lock->Release(); 87 lock->Release();
88 } 88 }
OLDNEW
« 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