macro_rules! set_impl {
($t: ty) => { ... };
}
Expand description
Set the critical section implementation.
ยงExample
use critical_section::RawRestoreState;
struct MyCriticalSection;
critical_section::set_impl!(MyCriticalSection);
unsafe impl critical_section::Impl for MyCriticalSection {
unsafe fn acquire() -> RawRestoreState {
// ...
}
unsafe fn release(restore_state: RawRestoreState) {
// ...
}
}