about summary refs log tree commit diff
path: root/src/libstd/sync/mpsc/spsc_queue.rs
diff options
context:
space:
mode:
authorManish Goregaokar <manishsmail@gmail.com>2015-02-24 07:14:41 +0530
committerManish Goregaokar <manishsmail@gmail.com>2015-02-24 12:08:34 +0530
commit3ca54390095085eaae0baf85b0d1552067c5ee1b (patch)
treee50973fda6443d39eda491461c4da0f6ddf3f08f /src/libstd/sync/mpsc/spsc_queue.rs
parenteaacc7aad5817ca10277ea6658d6e23b88d4cf77 (diff)
parent1db684f67ad277ab7a002ee238872ca68fb13b27 (diff)
downloadrust-3ca54390095085eaae0baf85b0d1552067c5ee1b.tar.gz
rust-3ca54390095085eaae0baf85b0d1552067c5ee1b.zip
Rollup merge of #22700 - nick29581:ints_hash, r=alexcrichton
 fmt and hash are pretty straightforward I think. sync is a bit more complex. I thought one or two of the `isize`s ought to be `i32`s, but that would require a bunch of casting (the root cause being the lack of atomics other than isize/usize).

r? @alexcrichton
Diffstat (limited to 'src/libstd/sync/mpsc/spsc_queue.rs')
-rw-r--r--src/libstd/sync/mpsc/spsc_queue.rs6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/libstd/sync/mpsc/spsc_queue.rs b/src/libstd/sync/mpsc/spsc_queue.rs
index 7b5c614536d..ce40fa2672a 100644
--- a/src/libstd/sync/mpsc/spsc_queue.rs
+++ b/src/libstd/sync/mpsc/spsc_queue.rs
@@ -69,7 +69,7 @@ pub struct Queue<T> {
 
     // Cache maintenance fields. Additions and subtractions are stored
     // separately in order to allow them to use nonatomic addition/subtraction.
-    cache_bound: uint,
+    cache_bound: usize,
     cache_additions: AtomicUsize,
     cache_subtractions: AtomicUsize,
 }
@@ -107,7 +107,7 @@ impl<T: Send> Queue<T> {
     ///               cache (if desired). If the value is 0, then the cache has
     ///               no bound. Otherwise, the cache will never grow larger than
     ///               `bound` (although the queue itself could be much larger.
-    pub unsafe fn new(bound: uint) -> Queue<T> {
+    pub unsafe fn new(bound: usize) -> Queue<T> {
         let n1 = Node::new();
         let n2 = Node::new();
         (*n1).next.store(n2, Ordering::Relaxed);
@@ -319,7 +319,7 @@ mod test {
             stress_bound(1);
         }
 
-        unsafe fn stress_bound(bound: uint) {
+        unsafe fn stress_bound(bound: usize) {
             let q = Arc::new(Queue::new(bound));
 
             let (tx, rx) = channel();