diff options
| author | Manish Goregaokar <manishsmail@gmail.com> | 2015-02-24 07:14:41 +0530 |
|---|---|---|
| committer | Manish Goregaokar <manishsmail@gmail.com> | 2015-02-24 12:08:34 +0530 |
| commit | 3ca54390095085eaae0baf85b0d1552067c5ee1b (patch) | |
| tree | e50973fda6443d39eda491461c4da0f6ddf3f08f /src/libstd/sync/mpsc/spsc_queue.rs | |
| parent | eaacc7aad5817ca10277ea6658d6e23b88d4cf77 (diff) | |
| parent | 1db684f67ad277ab7a002ee238872ca68fb13b27 (diff) | |
| download | rust-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.rs | 6 |
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(); |
