Skip to content

Commit 739da1d

Browse files
committed
doc: add documents of some crates
1 parent 6068590 commit 739da1d

File tree

1 file changed

+8
-1
lines changed

1 file changed

+8
-1
lines changed

src/lib.rs

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,12 @@
11
//! `no_std` spin lock implementation that can disable kernel local IRQs or
22
//! preemption while locking.
3+
//!
4+
//! # Cargo Features
5+
//!
6+
//! - `smp`: Use in the **multi-core** environment. For **single-core**
7+
//! environment (without this feature), the lock state is unnecessary and
8+
//! optimized out. CPU can always get the lock if we follow the proper guard
9+
//! in use. By default, this feature is disabled.
310
411
#![cfg_attr(not(test), no_std)]
512
#![feature(const_trait_impl)]
@@ -10,7 +17,7 @@ use kernel_guard::{NoOp, NoPreempt, NoPreemptIrqSave};
1017

1118
pub use self::base::{BaseSpinLock, BaseSpinLockGuard};
1219

13-
/// A spin lock that disbales kernel preemption while trying to lock, and
20+
/// A spin lock that disables kernel preemption while trying to lock, and
1421
/// re-enables it after unlocking.
1522
///
1623
/// It must be used in the local IRQ-disabled context, or never be used in

0 commit comments

Comments
 (0)