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

Side by Side Diff: src/heap/page-parallel-job.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/heap.h ('k') | src/heap/spaces.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 2016 the V8 project authors. All rights reserved. 1 // Copyright 2016 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_HEAP_PAGE_PARALLEL_JOB_ 5 #ifndef V8_HEAP_PAGE_PARALLEL_JOB_
6 #define V8_HEAP_PAGE_PARALLEL_JOB_ 6 #define V8_HEAP_PAGE_PARALLEL_JOB_
7 7
8 #include "src/allocation.h" 8 #include "src/allocation.h"
9 #include "src/cancelable-task.h" 9 #include "src/cancelable-task.h"
10 #include "src/utils.h" 10 #include "src/utils.h"
(...skipping 103 matching lines...) Expand 10 before | Expand all | Expand 10 after
114 114
115 private: 115 private:
116 static const int kMaxNumberOfTasks = 10; 116 static const int kMaxNumberOfTasks = 10;
117 117
118 enum ProcessingState { kAvailable, kProcessing, kFinished, kFailed }; 118 enum ProcessingState { kAvailable, kProcessing, kFinished, kFailed };
119 119
120 struct Item : public Malloced { 120 struct Item : public Malloced {
121 Item(MemoryChunk* chunk, typename JobTraits::PerPageData data, Item* next) 121 Item(MemoryChunk* chunk, typename JobTraits::PerPageData data, Item* next)
122 : chunk(chunk), state(kAvailable), data(data), next(next) {} 122 : chunk(chunk), state(kAvailable), data(data), next(next) {}
123 MemoryChunk* chunk; 123 MemoryChunk* chunk;
124 AtomicValue<ProcessingState> state; 124 base::AtomicValue<ProcessingState> state;
125 typename JobTraits::PerPageData data; 125 typename JobTraits::PerPageData data;
126 Item* next; 126 Item* next;
127 }; 127 };
128 128
129 class Task : public CancelableTask { 129 class Task : public CancelableTask {
130 public: 130 public:
131 Task(Heap* heap, Item* items, int num_items, int start_index, 131 Task(Heap* heap, Item* items, int num_items, int start_index,
132 base::Semaphore* on_finish, typename JobTraits::PerTaskData data) 132 base::Semaphore* on_finish, typename JobTraits::PerTaskData data)
133 : CancelableTask(heap->isolate()), 133 : CancelableTask(heap->isolate()),
134 heap_(heap), 134 heap_(heap),
(...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after
179 int num_items_; 179 int num_items_;
180 int num_tasks_; 180 int num_tasks_;
181 base::Semaphore* pending_tasks_; 181 base::Semaphore* pending_tasks_;
182 DISALLOW_COPY_AND_ASSIGN(PageParallelJob); 182 DISALLOW_COPY_AND_ASSIGN(PageParallelJob);
183 }; 183 };
184 184
185 } // namespace internal 185 } // namespace internal
186 } // namespace v8 186 } // namespace v8
187 187
188 #endif // V8_HEAP_PAGE_PARALLEL_JOB_ 188 #endif // V8_HEAP_PAGE_PARALLEL_JOB_
OLDNEW
« no previous file with comments | « src/heap/heap.h ('k') | src/heap/spaces.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698