aboutsummaryrefslogtreecommitdiff
path: root/rtic-sync
diff options
context:
space:
mode:
Diffstat (limited to 'rtic-sync')
-rw-r--r--rtic-sync/CHANGELOG.md8
-rw-r--r--rtic-sync/Cargo.toml3
-rw-r--r--rtic-sync/src/arbiter.rs2
-rw-r--r--rtic-sync/src/channel.rs2
-rw-r--r--rtic-sync/src/lib.rs1
5 files changed, 11 insertions, 5 deletions
diff --git a/rtic-sync/CHANGELOG.md b/rtic-sync/CHANGELOG.md
index 6bf0346..465f0de 100644
--- a/rtic-sync/CHANGELOG.md
+++ b/rtic-sync/CHANGELOG.md
@@ -3,7 +3,7 @@
All notable changes to this project will be documented in this file.
This project adheres to [Semantic Versioning](http://semver.org/).
-For each category, *Added*, *Changed*, *Fixed* add new entries at the top!
+For each category, _Added_, _Changed_, _Fixed_ add new entries at the top!
## [Unreleased]
@@ -13,6 +13,10 @@ For each category, *Added*, *Changed*, *Fixed* add new entries at the top!
### Fixed
+## [v1.0.3]
+
+- `portable-atomic` used as a drop in replacement for `core::sync::atomic` in code and macros. `portable-atomic` imported with `default-features = false`, as we do not require CAS.
+
## [v1.0.2] - 2023-08-29
### Fixed
@@ -25,6 +29,6 @@ For each category, *Added*, *Changed*, *Fixed* add new entries at the top!
- `make_channel` could be UB
-## [v1.0.0] - 2023-05-31 - yanked
+## [v1.0.0] - 2023-05-31 - yanked
- Initial release
diff --git a/rtic-sync/Cargo.toml b/rtic-sync/Cargo.toml
index a8f9070..064b9fa 100644
--- a/rtic-sync/Cargo.toml
+++ b/rtic-sync/Cargo.toml
@@ -1,6 +1,6 @@
[package]
name = "rtic-sync"
-version = "1.0.2"
+version = "1.0.3"
edition = "2021"
authors = [
@@ -20,6 +20,7 @@ license = "MIT OR Apache-2.0"
heapless = "0.7"
critical-section = "1"
rtic-common = { version = "1.0.0", path = "../rtic-common" }
+portable-atomic = { version = "1", default-features = false }
[dev-dependencies]
tokio = { version = "1", features = ["rt", "macros", "time"] }
diff --git a/rtic-sync/src/arbiter.rs b/rtic-sync/src/arbiter.rs
index deb0a4f..2d66a67 100644
--- a/rtic-sync/src/arbiter.rs
+++ b/rtic-sync/src/arbiter.rs
@@ -27,8 +27,8 @@ use core::cell::UnsafeCell;
use core::future::poll_fn;
use core::ops::{Deref, DerefMut};
use core::pin::Pin;
-use core::sync::atomic::{fence, AtomicBool, Ordering};
use core::task::{Poll, Waker};
+use portable_atomic::{fence, AtomicBool, Ordering};
use rtic_common::dropper::OnDrop;
use rtic_common::wait_queue::{Link, WaitQueue};
diff --git a/rtic-sync/src/channel.rs b/rtic-sync/src/channel.rs
index 61ae7e2..89a23af 100644
--- a/rtic-sync/src/channel.rs
+++ b/rtic-sync/src/channel.rs
@@ -108,7 +108,7 @@ macro_rules! make_channel {
static mut CHANNEL: $crate::channel::Channel<$type, $size> =
$crate::channel::Channel::new();
- static CHECK: ::core::sync::atomic::AtomicU8 = ::core::sync::atomic::AtomicU8::new(0);
+ static CHECK: $crate::portable_atomic::AtomicU8 = $crate::portable_atomic::AtomicU8::new(0);
$crate::channel::critical_section::with(|_| {
if CHECK.load(::core::sync::atomic::Ordering::Relaxed) != 0 {
diff --git a/rtic-sync/src/lib.rs b/rtic-sync/src/lib.rs
index fd8b6c3..ecd3247 100644
--- a/rtic-sync/src/lib.rs
+++ b/rtic-sync/src/lib.rs
@@ -5,6 +5,7 @@
pub mod arbiter;
pub mod channel;
+pub use portable_atomic;
#[cfg(test)]
#[macro_use]