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

Commit

Permalink
Release v1.0.3, deprecate crate.
Browse files Browse the repository at this point in the history
  • Loading branch information
Dirbaio committed Jul 11, 2023
1 parent aeb80b3 commit 48e55c1
Show file tree
Hide file tree
Showing 5 changed files with 21 additions and 2 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,10 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

No unreleased changes yet

## 1.0.3 - 2023-07-11

- Crate is deprecated, use `portable-atomic` instead.

## 1.0.2 - 2023-03-12

- Add MSP430 support.
Expand Down
2 changes: 1 addition & 1 deletion Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ license = "MIT OR Apache-2.0"
name = "atomic-polyfill"
readme = "README.md"
repository = "https://github.com/embassy-rs/atomic-polyfill"
version = "1.0.2"
version = "1.0.3"

categories = [
"embedded",
Expand Down
14 changes: 14 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,17 @@
# ⚠️ THIS CRATE IS DEPRECATED ⚠️

**Use [`portable-atomic`](https://crates.io/crates/portable-atomic) instead.** It supports many more architectures and more efficient ways of emulating atomics.

`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`.

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.
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.

**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.
If you enable features, you're taking their choice away.

-----

# atomic-polyfill

[![Documentation](https://docs.rs/atomic-polyfill/badge.svg)](https://docs.rs/atomic-polyfill)
Expand Down
1 change: 1 addition & 0 deletions src/lib.rs
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
#![no_std]
#![cfg_attr(reexport_core, forbid(unsafe_code))]
#![doc = include_str!("../README.md")]

#[cfg(reexport_core)]
pub use core::sync::atomic::*;
Expand Down

0 comments on commit 48e55c1

Please sign in to comment.