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

Unified Diff: src/spaces.h

Issue 214543008: Use acquire/release stores and loads when reading and writing the parallel sweeping state of a page. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 6 years, 9 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/spaces.h
diff --git a/src/spaces.h b/src/spaces.h
index 05254d02437930ec745e548abff7415548b299bc..908e723827586d8af2bcfb3d798def1defab4539 100644
--- a/src/spaces.h
+++ b/src/spaces.h
@@ -484,18 +484,18 @@ class MemoryChunk {
ParallelSweepingState parallel_sweeping() {
return static_cast<ParallelSweepingState>(
- NoBarrier_Load(&parallel_sweeping_));
+ Acquire_Load(&parallel_sweeping_));
}
void set_parallel_sweeping(ParallelSweepingState state) {
- NoBarrier_Store(&parallel_sweeping_, state);
+ Release_Store(&parallel_sweeping_, state);
}
bool TryParallelSweeping() {
- return NoBarrier_CompareAndSwap(&parallel_sweeping_,
- PARALLEL_SWEEPING_PENDING,
- PARALLEL_SWEEPING_IN_PROGRESS) ==
- PARALLEL_SWEEPING_PENDING;
+ return Acquire_CompareAndSwap(&parallel_sweeping_,
+ PARALLEL_SWEEPING_PENDING,
+ PARALLEL_SWEEPING_IN_PROGRESS) ==
+ PARALLEL_SWEEPING_PENDING;
}
// Manage live byte count (count of bytes known to be live,
« 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