mirror of
https://github.com/rust-embedded/heapless.git
synced 2026-04-30 05:54:04 +00:00
remove pool tsan test
tsan does not support the 32-bit x86 targets
This commit is contained in:
2
.github/workflows/build.yml
vendored
2
.github/workflows/build.yml
vendored
@@ -250,8 +250,6 @@ jobs:
|
||||
- x86_64-unknown-linux-gnu
|
||||
toolchain:
|
||||
- nightly
|
||||
features:
|
||||
- x86-sync-pool
|
||||
buildtype:
|
||||
- ""
|
||||
- "--release"
|
||||
|
||||
@@ -241,35 +241,3 @@ fn iterator_properly_wraps() {
|
||||
}
|
||||
assert_eq!(expected, actual)
|
||||
}
|
||||
|
||||
#[cfg(all(target_arch = "x86_64", feature = "x86-sync-pool"))]
|
||||
#[test]
|
||||
fn pool() {
|
||||
use heapless::pool::singleton::Pool as _;
|
||||
|
||||
static mut M: [u8; (N + 1) * 8] = [0; (N + 1) * 8];
|
||||
const N: usize = 16 * 1024;
|
||||
heapless::pool!(A: [u8; 8]);
|
||||
|
||||
A::grow(unsafe { &mut M });
|
||||
|
||||
thread::scope(move |scope| {
|
||||
scope.spawn(move || {
|
||||
for _ in 0..N / 4 {
|
||||
let a = A::alloc().unwrap();
|
||||
let b = A::alloc().unwrap();
|
||||
drop(a);
|
||||
let b = b.init([1; 8]);
|
||||
drop(b);
|
||||
}
|
||||
});
|
||||
|
||||
scope.spawn(move || {
|
||||
for _ in 0..N / 2 {
|
||||
let a = A::alloc().unwrap();
|
||||
let a = a.init([2; 8]);
|
||||
drop(a);
|
||||
}
|
||||
});
|
||||
});
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user