diff options
Diffstat (limited to 'components/util')
-rw-r--r-- | components/util/tid.rs | 4 | ||||
-rw-r--r-- | components/util/workqueue.rs | 6 |
2 files changed, 5 insertions, 5 deletions
diff --git a/components/util/tid.rs b/components/util/tid.rs index 5cea4fe0d43..62723941fcb 100644 --- a/components/util/tid.rs +++ b/components/util/tid.rs @@ -2,7 +2,7 @@ * License, v. 2.0. If a copy of the MPL was not distributed with this * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ -use std::sync::atomic::{AtomicUint, INIT_ATOMIC_UINT, SeqCst}; +use std::sync::atomic::{AtomicUint, INIT_ATOMIC_UINT, Ordering}; use std::rc::Rc; use std::cell::RefCell; @@ -15,7 +15,7 @@ pub fn tid() -> uint { TASK_LOCAL_TID.with(|ref k| { let ret = match *k.borrow() { - None => unsafe { next_tid.fetch_add(1, SeqCst) }, + None => unsafe { next_tid.fetch_add(1, Ordering::SeqCst) }, Some(x) => x, }; 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); } |