Skip to content

Commit

Permalink
Add all-still feature
Browse files Browse the repository at this point in the history
  • Loading branch information
mkroening committed Mar 8, 2023
1 parent 788d9c2 commit 3141d46
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 0 deletions.
3 changes: 3 additions & 0 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -23,3 +23,6 @@ tock-registers = { version = "0.8", default-features = false }

[dev-dependencies]
rand = "0.8"

[features]
all-still = []
15 changes: 15 additions & 0 deletions src/mutex/mod.rs
Original file line number Diff line number Diff line change
@@ -1,7 +1,22 @@
pub(crate) mod interrupt;
#[cfg(not(feature = "all-still"))]
pub(crate) mod spin;
#[cfg(feature = "all-still")]
pub(crate) mod spin {
pub use super::still::{
RawStillMutex as RawSpinMutex, StillMutex as SpinMutex, StillMutexGuard as SpinMutexGuard,
};
}
pub(crate) mod still;
#[cfg(not(feature = "all-still"))]
pub(crate) mod ticket;
#[cfg(feature = "all-still")]
pub(crate) mod ticket {
pub use super::still::{
RawStillMutex as RawTicketMutex, StillMutex as TicketMutex,
StillMutexGuard as TicketMutexGuard,
};
}

use interrupt::RawInterruptMutex;
use spin::RawSpinMutex;
Expand Down

0 comments on commit 3141d46

Please sign in to comment.