atomicbox_nostd/lib.rs
1//! Safe atomic boxes.
2//!
3//! The standard library provides atomic booleans, integers, and pointers.
4//! `AtomicPtr` is safe for loading, storing, and so forth; but pointers are
5//! unsafe to use.
6//!
7//! It turns out that a safe atomic `Box` type is possible. Unfortunately, the
8//! only operation it supports is `swap`. Still, this is sufficient for some
9//! lock-free data structures, so here it is!
10
11#![cfg_attr(not(test), no_std)]
12
13extern crate alloc;
14
15mod atomic_box;
16mod atomic_option_box;
17
18pub use atomic_box::AtomicBox;
19pub use atomic_option_box::AtomicOptionBox;