2 stable releases

1.1.0 Jun 21, 2023
1.0.0 Mar 11, 2023

#2634 in Rust patterns

BSL-1.0 license

20KB
295 lines

atomik

Rust Crates.io Documentation

Generic Atomic implementation

Features

  • critical-section-polyfill - Enables polyfill implementation for embedded targets based on critical section.

lib.rs:

Generic atomic

This Atomic allows only types whose size and alignment is compatible with u8, u16, u32, u64.

With exception of fetch_* methods, all atomic methods are implemented for generic T

fetch_* makes sense only to integers and partially for bool, hence they are implemented as specialized methods.

All methods require atomic support, if target has no atomics of required size, then it will fail to compile using particular methods.

Features

  • critical-section-polyfill - Enables polyfill implementation for embedded targets based on critical section. This polyfill only valid for single threaded chips.

Dependencies

~11KB