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

Side by Side Diff: src/locked-queue-inl.h

Issue 1954603002: Move atomic-utils.h into base/ (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 4 years, 7 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 | « src/heap/spaces.h ('k') | src/profiler/cpu-profiler.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 2015 the V8 project authors. All rights reserved. 1 // Copyright 2015 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 #ifndef V8_LOCKED_QUEUE_INL_ 5 #ifndef V8_LOCKED_QUEUE_INL_
6 #define V8_LOCKED_QUEUE_INL_ 6 #define V8_LOCKED_QUEUE_INL_
7 7
8 #include "src/atomic-utils.h" 8 #include "src/base/atomic-utils.h"
9 #include "src/locked-queue.h" 9 #include "src/locked-queue.h"
10 10
11 namespace v8 { 11 namespace v8 {
12 namespace internal { 12 namespace internal {
13 13
14 template <typename Record> 14 template <typename Record>
15 struct LockedQueue<Record>::Node : Malloced { 15 struct LockedQueue<Record>::Node : Malloced {
16 Node() : next(nullptr) {} 16 Node() : next(nullptr) {}
17 Record value; 17 Record value;
18 AtomicValue<Node*> next; 18 base::AtomicValue<Node*> next;
19 }; 19 };
20 20
21 21
22 template <typename Record> 22 template <typename Record>
23 inline LockedQueue<Record>::LockedQueue() { 23 inline LockedQueue<Record>::LockedQueue() {
24 head_ = new Node(); 24 head_ = new Node();
25 CHECK(head_ != nullptr); 25 CHECK(head_ != nullptr);
26 tail_ = head_; 26 tail_ = head_;
27 } 27 }
28 28
(...skipping 53 matching lines...) Expand 10 before | Expand all | Expand 10 after
82 Node* const next_node = head_->next.Value(); 82 Node* const next_node = head_->next.Value();
83 if (next_node == nullptr) return false; 83 if (next_node == nullptr) return false;
84 *record = next_node->value; 84 *record = next_node->value;
85 return true; 85 return true;
86 } 86 }
87 87
88 } // namespace internal 88 } // namespace internal
89 } // namespace v8 89 } // namespace v8
90 90
91 #endif // V8_LOCKED_QUEUE_INL_ 91 #endif // V8_LOCKED_QUEUE_INL_
OLDNEW
« no previous file with comments | « src/heap/spaces.h ('k') | src/profiler/cpu-profiler.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698