pub const fn const_spinlock<T>(val: T) -> Spinlock<T>
Expand description

Create an unlocked Spinlock in a const context.

Example

use spinning_top::{const_spinlock, Spinlock};

static SPINLOCK: Spinlock<i32> = const_spinlock(42);