Skip to content

Commit adee3a0

Browse files
committed
fix build for ARMv6-M
1 parent a4f33b4 commit adee3a0

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

src/pool/singleton/arc.rs

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,9 +54,15 @@ use core::{
5454
marker::PhantomData,
5555
ops::Deref,
5656
ptr,
57-
sync::atomic::{self, AtomicUsize, Ordering},
57+
sync::atomic,
5858
};
5959

60+
#[cfg(armv6m)]
61+
use atomic_polyfill::{AtomicUsize, Ordering};
62+
63+
#[cfg(not(armv6m))]
64+
use core::sync::atomic::{AtomicUsize, Ordering};
65+
6066
use crate::pool::{self, stack::Ptr, Node};
6167

6268
/// Instantiates a pool of Arc pointers as a global singleton

0 commit comments

Comments
 (0)