Commit 155225c6 authored by hpayer@chromium.org's avatar hpayer@chromium.org

Use acquire/release stores and loads when reading and writing the parallel...

Use acquire/release stores and loads when reading and writing the parallel sweeping state of a page.

BUG=
R=jarin@chromium.org

Review URL: https://codereview.chromium.org/214543008

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@20301 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
parent 4cdfb46a
......@@ -484,15 +484,15 @@ 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_,
return Acquire_CompareAndSwap(&parallel_sweeping_,
PARALLEL_SWEEPING_PENDING,
PARALLEL_SWEEPING_IN_PROGRESS) ==
PARALLEL_SWEEPING_PENDING;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment