// Copyright 2023-Present Jonas Kruckenberg
//
// Licensed under the Apache License, Version 2.0, <LICENSE-APACHE or
// http://apache.org/licenses/LICENSE-2.0> or the MIT license <LICENSE-MIT or
// http://opensource.org/licenses/MIT>, at your option. This file may not be
// copied, modified, or distributed except according to those terms.

//! Synchronization primitives for use in k23.

#![cfg_attr(not(test), no_std)]
#![feature(dropck_eyepatch)]
#![feature(negative_impls)]

mod backoff;
mod barrier;
mod irq_mutex;
mod irq_rw_lock;
mod lazy_lock;
mod loom;
mod mutex;
mod once;
mod once_lock;
mod rw_lock;
mod util;

pub use backoff::Backoff;
pub use barrier::{Barrier, BarrierWaitResult};
pub use irq_mutex::IrqMutex;
pub use irq_rw_lock::IrqRwLock;
pub use lazy_lock::LazyLock;
pub use mutex::{Mutex, RawMutex};
pub use once::{ExclusiveState, Once};
pub use once_lock::OnceLock;
pub use rw_lock::{RwLock, Upgradeable};
