Closed reitermarkus closed 1 year ago
Okay, so I have a different implementation which doesn't spin and simply completely blocks all threads during initialize
, but this causes cargo test
to deadlock unless using --test-threads 1
.
@matklad, can you have another look?
@matklad, can you have another look at this? Thanks.
lgtm!
bors r+
Add implementation based on
critical-section
for embedded targets.This started out using
critical_section::Mutex
, but tests were failing sincecritical_section::with
blocks all threads during initialization, so I changed it to be basically the same asimp_pl
without theparking_lot
parts, sinceatomic-polyfill
is based oncritical-section
.Depends on https://github.com/rust-embedded/critical-section/pull/26.