Skip to content

Commit 619f7db

Browse files
committed
Fixed a few typos
1 parent 7cc8377 commit 619f7db

File tree

5 files changed

+12
-12
lines changed

5 files changed

+12
-12
lines changed

crossbeam-epoch/src/atomic.rs

+4-4
Original file line numberDiff line numberDiff line change
@@ -749,7 +749,7 @@ pub trait Pointer<T: ?Sized + Pointable> {
749749
/// # Safety
750750
///
751751
/// The given `data` should have been created by `Pointer::into_usize()`, and one `data` should
752-
/// not be converted back by `Pointer::from_usize()` mutliple times.
752+
/// not be converted back by `Pointer::from_usize()` multiple times.
753753
unsafe fn from_usize(data: usize) -> Self;
754754
}
755755

@@ -801,7 +801,7 @@ impl<T> Owned<T> {
801801
/// # Safety
802802
///
803803
/// The given `raw` should have been derived from `Owned`, and one `raw` should not be converted
804-
/// back by `Owned::from_raw()` mutliple times.
804+
/// back by `Owned::from_raw()` multiple times.
805805
///
806806
/// # Examples
807807
///
@@ -1108,7 +1108,7 @@ impl<'g, T: ?Sized + Pointable> Shared<'g, T> {
11081108
///
11091109
/// Dereferencing a pointer is unsafe because it could be pointing to invalid memory.
11101110
///
1111-
/// Another concern is the possiblity of data races due to lack of proper synchronization.
1111+
/// Another concern is the possibility of data races due to lack of proper synchronization.
11121112
/// For example, consider the following scenario:
11131113
///
11141114
/// 1. A thread creates a new object: `a.store(Owned::new(10), Relaxed)`
@@ -1188,7 +1188,7 @@ impl<'g, T: ?Sized + Pointable> Shared<'g, T> {
11881188
///
11891189
/// Dereferencing a pointer is unsafe because it could be pointing to invalid memory.
11901190
///
1191-
/// Another concern is the possiblity of data races due to lack of proper synchronization.
1191+
/// Another concern is the possibility of data races due to lack of proper synchronization.
11921192
/// For example, consider the following scenario:
11931193
///
11941194
/// 1. A thread creates a new object: `a.store(Owned::new(10), Relaxed)`

crossbeam-epoch/src/internal.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@
2929
//! Whenever a bag is pushed into a queue, the objects in some bags in the queue are collected and
3030
//! destroyed along the way. This design reduces contention on data structures. The global queue
3131
//! cannot be explicitly accessed: the only way to interact with it is by calling functions
32-
//! `defer()` that adds an object tothe thread-local bag, or `collect()` that manually triggers
32+
//! `defer()` that adds an object to the thread-local bag, or `collect()` that manually triggers
3333
//! garbage collection.
3434
//!
3535
//! Ideally each instance of concurrent data structure may have its own queue that gets fully
@@ -368,7 +368,7 @@ pub struct Local {
368368

369369
/// Total number of pinnings performed.
370370
///
371-
/// This is just an auxilliary counter that sometimes kicks off collection.
371+
/// This is just an auxiliary counter that sometimes kicks off collection.
372372
pin_count: Cell<Wrapping<usize>>,
373373
}
374374

crossbeam-skiplist/src/base.rs

+4-4
Original file line numberDiff line numberDiff line change
@@ -226,7 +226,7 @@ impl<K, V> Node<K, V> {
226226
}
227227
}
228228

229-
/// Decrements the reference count of a node, pinning the thread and destoying the node
229+
/// Decrements the reference count of a node, pinning the thread and destroying the node
230230
/// if the count become zero.
231231
#[inline]
232232
unsafe fn decrement_with_pin<F>(&self, parent: &SkipList<K, V>, pin: F)
@@ -1157,7 +1157,7 @@ where
11571157

11581158
loop {
11591159
{
1160-
// Search for the first entry in order to unlink all the preceeding entries
1160+
// Search for the first entry in order to unlink all the preceding entries
11611161
// we have removed.
11621162
//
11631163
// By unlinking nodes in batches we make sure that the final search doesn't
@@ -1933,7 +1933,7 @@ where
19331933
pub struct IntoIter<K, V> {
19341934
/// The current node.
19351935
///
1936-
/// All preceeding nods have already been destroyed.
1936+
/// All preceding nods have already been destroyed.
19371937
node: *mut Node<K, V>,
19381938
}
19391939

@@ -1946,7 +1946,7 @@ impl<K, V> Drop for IntoIter<K, V> {
19461946
// the skip list.
19471947
let next = (*self.node).tower[0].load(Ordering::Relaxed, epoch::unprotected());
19481948

1949-
// We can safely do this without defering because references to
1949+
// We can safely do this without deferring because references to
19501950
// keys & values that we give out never outlive the SkipList.
19511951
Node::finalize(self.node);
19521952

crossbeam-utils/src/cache_padded.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ use core::ops::{Deref, DerefMut};
44
/// Pads and aligns a value to the length of a cache line.
55
///
66
/// In concurrent programming, sometimes it is desirable to make sure commonly accessed pieces of
7-
/// data are not placed into the same cache line. Updating an atomic value invalides the whole
7+
/// data are not placed into the same cache line. Updating an atomic value invalidates the whole
88
/// cache line it belongs to, which makes the next access to the same cache line slower for other
99
/// CPU cores. Use `CachePadded` to ensure updating one piece of data doesn't invalidate other
1010
/// cached data.

crossbeam-utils/src/thread.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -442,7 +442,7 @@ impl<'scope, 'env> ScopedThreadBuilder<'scope, 'env> {
442442
*result.lock().unwrap() = Some(res);
443443
};
444444

445-
// Allocate `clsoure` on the heap and erase the `'env` bound.
445+
// Allocate `closure` on the heap and erase the `'env` bound.
446446
let closure: Box<dyn FnOnce() + Send + 'env> = Box::new(closure);
447447
let closure: Box<dyn FnOnce() + Send + 'static> =
448448
unsafe { mem::transmute(closure) };

0 commit comments

Comments
 (0)