pub unsafe trait Impl {
// Required methods
unsafe fn acquire() -> RawRestoreState;
unsafe fn release(restore_state: RawRestoreState);
}
Expand description
Methods required for a critical section implementation.
This trait is not intended to be used except when implementing a critical section.
§Safety
Implementations must uphold the contract specified in crate::acquire
and crate::release
.
Required Methods§
Sourceunsafe fn acquire() -> RawRestoreState
unsafe fn acquire() -> RawRestoreState
Acquire the critical section.
§Safety
Callers must uphold the contract specified in crate::acquire
and crate::release
.
Sourceunsafe fn release(restore_state: RawRestoreState)
unsafe fn release(restore_state: RawRestoreState)
Release the critical section.
§Safety
Callers must uphold the contract specified in crate::acquire
and crate::release
.
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.