From b5db43550185c2acd62d3f27bc89f2f24b4fbb22 Mon Sep 17 00:00:00 2001 From: datdenkikniet Date: Sun, 16 Mar 2025 12:46:23 +0100 Subject: rtic-sync: introduce loom compat layer and apply it to `channel` --- rtic-sync/Cargo.toml | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) (limited to 'rtic-sync/Cargo.toml') diff --git a/rtic-sync/Cargo.toml b/rtic-sync/Cargo.toml index 60d8be2..cb54eef 100644 --- a/rtic-sync/Cargo.toml +++ b/rtic-sync/Cargo.toml @@ -25,15 +25,23 @@ portable-atomic = { version = "1", default-features = false } embedded-hal = { version = "1.0.0" } embedded-hal-async = { version = "1.0.0" } embedded-hal-bus = { version = "0.2.0", features = ["async"] } - defmt-03 = { package = "defmt", version = "0.3", optional = true } [dev-dependencies] cassette = "0.3.0" static_cell = "2.1.0" -tokio = { version = "1", features = ["rt", "macros", "time"] } + +[target.'cfg(not(loom))'.dev-dependencies] +tokio = { version = "1", features = ["rt", "macros", "time"], default-features = false } [features] default = [] testing = ["critical-section/std", "rtic-common/testing"] defmt-03 = ["dep:defmt-03", "embedded-hal/defmt-03", "embedded-hal-async/defmt-03", "embedded-hal-bus/defmt-03"] + +[lints.rust] +unexpected_cfgs = { level = "allow", check-cfg = ['cfg(loom)'] } + +[target.'cfg(loom)'.dependencies] +loom = { version = "0.7.2", features = [ "futures" ] } +critical-section = { version = "1", features = [ "restore-state-bool" ] } -- cgit v1.2.3