Macro critical_section::set_impl

source ·
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) {
        // ...
    }
}