From 5655c6093f8938c5ba637785b8bd572345f4c42e Mon Sep 17 00:00:00 2001 From: Dario Nieuwenhuis Date: Mon, 26 Dec 2022 02:42:54 +0100 Subject: [PATCH] net: use atomic-polyfill on tcp client pool, for thumbv6m support. --- embassy-net/Cargo.toml | 1 + embassy-net/src/tcp.rs | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/embassy-net/Cargo.toml b/embassy-net/Cargo.toml index 1faf603be..357f87922 100644 --- a/embassy-net/Cargo.toml +++ b/embassy-net/Cargo.toml @@ -45,6 +45,7 @@ stable_deref_trait = { version = "1.2.0", default-features = false } futures = { version = "0.3.17", default-features = false, features = [ "async-await" ] } atomic-pool = "1.0" embedded-nal-async = { version = "0.3.0", optional = true } +atomic-polyfill = { version = "1.0" } [dependencies.smoltcp] version = "0.8.0" diff --git a/embassy-net/src/tcp.rs b/embassy-net/src/tcp.rs index 55cbda455..0dc8da73a 100644 --- a/embassy-net/src/tcp.rs +++ b/embassy-net/src/tcp.rs @@ -329,8 +329,8 @@ pub mod client { use core::cell::UnsafeCell; use core::mem::MaybeUninit; use core::ptr::NonNull; - use core::sync::atomic::{AtomicBool, Ordering}; + use atomic_polyfill::{AtomicBool, Ordering}; use embedded_nal_async::IpAddr; use super::*;