aboutsummaryrefslogtreecommitdiffstats
path: root/components/util/workqueue.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/util/workqueue.rs
parent524966e3af8fbc871005cef460dc86c379a36034 (diff)
downloadservo-faefb27f3e8daed229bc8f15956e314fc01e31d9.tar.gz
servo-faefb27f3e8daed229bc8f15956e314fc01e31d9.zip
Use std::sync::atomic::Ordering explicitly.
Diffstat (limited to 'components/util/workqueue.rs')
-rw-r--r--components/util/workqueue.rs6
1 files changed, 3 insertions, 3 deletions
diff --git a/components/util/workqueue.rs b/components/util/workqueue.rs
index 9fef7ac2a81..ee14a4d1a50 100644
--- a/components/util/workqueue.rs
+++ b/components/util/workqueue.rs
@@ -14,7 +14,7 @@ use libc::funcs::posix88::unistd::usleep;
use rand::{Rng, XorShiftRng};
use std::mem;
use std::rand::weak_rng;
-use std::sync::atomic::{AtomicUint, SeqCst};
+use std::sync::atomic::{AtomicUint, Ordering};
use deque::{Abort, BufferPool, Data, Empty, Stealer, Worker};
/// A unit of work.
@@ -157,7 +157,7 @@ impl<QueueData: Send, WorkData: Send> WorkerThread<QueueData, WorkData> {
// The work is done. Now decrement the count of outstanding work items. If this was
// the last work unit in the queue, then send a message on the channel.
unsafe {
- if (*ref_count).fetch_sub(1, SeqCst) == 1 {
+ if (*ref_count).fetch_sub(1, Ordering::SeqCst) == 1 {
self.chan.send(SupervisorMsg::Finished)
}
}
@@ -181,7 +181,7 @@ impl<'a, QueueData: 'static, WorkData: Send> WorkerProxy<'a, QueueData, WorkData
#[inline]
pub fn push(&mut self, work_unit: WorkUnit<QueueData, WorkData>) {
unsafe {
- drop((*self.ref_count).fetch_add(1, SeqCst));
+ drop((*self.ref_count).fetch_add(1, Ordering::SeqCst));
}
self.worker.push(work_unit);
}