aboutsummaryrefslogtreecommitdiffstats
path: root/components/layout/parallel.rs
diff options
context:
space:
mode:
authorMs2ger <ms2ger@gmail.com>2015-01-22 13:25:20 +0100
committerMs2ger <ms2ger@gmail.com>2015-01-22 14:49:25 +0100
commitfaefb27f3e8daed229bc8f15956e314fc01e31d9 (patch)
tree9f205fdb6e01dfca3ea28f5fc58429951fea007d /components/layout/parallel.rs
parent524966e3af8fbc871005cef460dc86c379a36034 (diff)
downloadservo-faefb27f3e8daed229bc8f15956e314fc01e31d9.tar.gz
servo-faefb27f3e8daed229bc8f15956e314fc01e31d9.zip
Use std::sync::atomic::Ordering explicitly.
Diffstat (limited to 'components/layout/parallel.rs')
-rw-r--r--components/layout/parallel.rs10
1 files changed, 5 insertions, 5 deletions
diff --git a/components/layout/parallel.rs b/components/layout/parallel.rs
index a6a20ad33ba..5ec5c2c661b 100644
--- a/components/layout/parallel.rs
+++ b/components/layout/parallel.rs
@@ -23,7 +23,7 @@ use servo_util::time::{TimeProfilerCategory, ProfilerMetadata, TimeProfilerChan,
use servo_util::workqueue::{WorkQueue, WorkUnit, WorkerProxy};
use std::mem;
use std::ptr;
-use std::sync::atomic::{AtomicInt, Relaxed, SeqCst};
+use std::sync::atomic::{AtomicInt, Ordering};
#[allow(dead_code)]
fn static_assertion(node: UnsafeLayoutNode) {
@@ -108,7 +108,7 @@ pub trait ParallelPreorderDomTraversal : PreorderDomTraversal {
{
let mut layout_data_ref = node.mutate_layout_data();
let layout_data = layout_data_ref.as_mut().expect("no layout data");
- layout_data.data.parallel.children_count.store(child_count as int, Relaxed);
+ layout_data.data.parallel.children_count.store(child_count as int, Ordering::Relaxed);
}
// Possibly enqueue the children.
@@ -173,7 +173,7 @@ trait ParallelPostorderDomTraversal : PostorderDomTraversal {
.data
.parallel
.children_count
- .fetch_sub(1, SeqCst) == 1 {
+ .fetch_sub(1, Ordering::SeqCst) == 1 {
// We were the last child of our parent. Construct flows for our parent.
} else {
// Get out of here and find another node to work on.
@@ -231,7 +231,7 @@ trait ParallelPostorderFlowTraversal : PostorderFlowTraversal {
let base = flow::mut_base(flow.deref_mut());
// Reset the count of children for the next layout traversal.
- base.parallel.children_count.store(base.children.len() as int, Relaxed);
+ base.parallel.children_count.store(base.children.len() as int, Ordering::Relaxed);
// Possibly enqueue the parent.
let unsafe_parent = base.parallel.parent;
@@ -245,7 +245,7 @@ trait ParallelPostorderFlowTraversal : PostorderFlowTraversal {
// on with our parent; otherwise, we've gotta wait.
let parent: &mut FlowRef = mem::transmute(&unsafe_parent);
let parent_base = flow::mut_base(parent.deref_mut());
- if parent_base.parallel.children_count.fetch_sub(1, SeqCst) == 1 {
+ if parent_base.parallel.children_count.fetch_sub(1, Ordering::SeqCst) == 1 {
// We were the last child of our parent. Reflow our parent.
unsafe_flow = unsafe_parent
} else {