Skip to content
This repository was archived by the owner on Jul 11, 2023. It is now read-only.

Commit 48e55c1

Browse files
committed
Release v1.0.3, deprecate crate.
1 parent aeb80b3 commit 48e55c1

File tree

5 files changed

+21
-2
lines changed

5 files changed

+21
-2
lines changed

CHANGELOG.md

+4
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,10 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
99

1010
No unreleased changes yet
1111

12+
## 1.0.3 - 2023-07-11
13+
14+
- Crate is deprecated, use `portable-atomic` instead.
15+
1216
## 1.0.2 - 2023-03-12
1317

1418
- Add MSP430 support.

Cargo.lock

+1-1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Cargo.toml

+1-1
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ license = "MIT OR Apache-2.0"
66
name = "atomic-polyfill"
77
readme = "README.md"
88
repository = "https://github.com/embassy-rs/atomic-polyfill"
9-
version = "1.0.2"
9+
version = "1.0.3"
1010

1111
categories = [
1212
"embedded",

README.md

+14
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,17 @@
1+
# ⚠️ THIS CRATE IS DEPRECATED ⚠️
2+
3+
**Use [`portable-atomic`](https://crates.io/crates/portable-atomic) instead.** It supports many more architectures and more efficient ways of emulating atomics.
4+
5+
`portable-atomic` with the `critical-section` feature is a drop-in replacement. It uses the `critical-section` crate to ensure locking, just like `atomic-polyfill`.
6+
7+
However, if your chip is single-core, you might want to enable the `unsafe-assume-single-core` feature instead. It makes `portable-atomic` emulate atomics by disabling interrupts.
8+
It is faster than using a `critical-section` implementation that disables interrupts, because it allows disabling them only on CAS operations, not in load/store operations.
9+
10+
**If you're writing a library**, add a dependency on `portable-atomic` but do NOT enable any feature on it. Let the end user of your library enable the right features for their target.
11+
If you enable features, you're taking their choice away.
12+
13+
-----
14+
115
# atomic-polyfill
216

317
[![Documentation](https://docs.rs/atomic-polyfill/badge.svg)](https://docs.rs/atomic-polyfill)

src/lib.rs

+1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
#![no_std]
22
#![cfg_attr(reexport_core, forbid(unsafe_code))]
3+
#![doc = include_str!("../README.md")]
34

45
#[cfg(reexport_core)]
56
pub use core::sync::atomic::*;

0 commit comments

Comments
 (0)