From 14b924e83a052ec2295fefc9f0f20d6197b4832e Mon Sep 17 00:00:00 2001 From: LinuxHeki Date: Tue, 2 May 2023 14:39:29 +0200 Subject: [PATCH 1/2] update no-std-compat dependency --- Cargo.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Cargo.toml b/Cargo.toml index 503903db..908b55cb 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -25,7 +25,7 @@ bitflags = { version = "1", default-features = false } smartstring = { version = "1", default-features = false } rhai_codegen = { version = "1.5.0", path = "codegen", default-features = false } -no-std-compat = { version = "0.4", default-features = false, features = ["alloc"], optional = true } +no-std-compat = { git = "https://gitlab.com/jD91mZM2/no-std-compat", default-features = false, features = ["alloc"], optional = true } libm = { version = "0.2", default-features = false, optional = true } hashbrown = { version = "0.13", optional = true } core-error = { version = "0.0", default-features = false, features = ["alloc"], optional = true } From 4c0a1e945913081fcd35fdf6eed182513e3521d5 Mon Sep 17 00:00:00 2001 From: LinuxHeki Date: Tue, 2 May 2023 14:41:53 +0200 Subject: [PATCH 2/2] fix compilation for thumbv6m-none-eabi --- src/config/hashing.rs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/config/hashing.rs b/src/config/hashing.rs index fcd655f1..2ac19199 100644 --- a/src/config/hashing.rs +++ b/src/config/hashing.rs @@ -50,7 +50,8 @@ impl HokmaLock { pub fn write(&'static self) -> WhenTheHokmaSuppression { loop { - let previous = self.lock.swap(1, Ordering::SeqCst); + let previous = self.lock.load(Ordering::SeqCst); + self.lock.store(1, Ordering::SeqCst); if previous != 1 { return WhenTheHokmaSuppression {