aboutsummaryrefslogtreecommitdiff
path: root/testsuite
diff options
context:
space:
mode:
authorGravatar bors[bot] <26634292+bors[bot]@users.noreply.github.com> 2022-08-12 00:34:12 +0000
committerGravatar GitHub <noreply@github.com> 2022-08-12 00:34:12 +0000
commit0e530549de322684c50e858c6bb985afb5479dbe (patch)
tree21efc15cdadf74ac03a2e210f15eff1542f33e82 /testsuite
parente46e2310adc86a5a09a1858a23ecdde2a2c6963f (diff)
parent3a15a6b4b320fa328e8ab99c31f81536960dd280 (diff)
downloadcortex-m-0e530549de322684c50e858c6bb985afb5479dbe.tar.gz
cortex-m-0e530549de322684c50e858c6bb985afb5479dbe.tar.zst
cortex-m-0e530549de322684c50e858c6bb985afb5479dbe.zip
Merge #447
447: Add implementation for critical-section 1.0 r=adamgreig a=Dirbaio Picking up #433 since it seems stalled. Changes from #433 are: - Update to `critical-section 1.0.0-alpha.2` - Use `bool` restore token - Name Cargo feature `critical-section-single-core`. TODO before merging: - [x] Wait for `critical-section 1.0` release https://github.com/rust-embedded/critical-section/pull/19 Co-Authored-By: Markus Reiter `@reitermarkus` Co-authored-by: Dario Nieuwenhuis <dirbaio@dirbaio.net>
Diffstat (limited to 'testsuite')
-rw-r--r--testsuite/Cargo.toml1
-rw-r--r--testsuite/minitest/macros/src/lib.rs4
2 files changed, 3 insertions, 2 deletions
diff --git a/testsuite/Cargo.toml b/testsuite/Cargo.toml
index 17f1562..be3e43d 100644
--- a/testsuite/Cargo.toml
+++ b/testsuite/Cargo.toml
@@ -13,6 +13,7 @@ semihosting = ["cortex-m-semihosting", "minitest/semihosting"]
cortex-m-rt.path = "../cortex-m-rt"
cortex-m.path = ".."
minitest.path = "minitest"
+critical-section = "1.0.0"
[dependencies.rtt-target]
version = "0.3.1"
diff --git a/testsuite/minitest/macros/src/lib.rs b/testsuite/minitest/macros/src/lib.rs
index 6570502..e8a1087 100644
--- a/testsuite/minitest/macros/src/lib.rs
+++ b/testsuite/minitest/macros/src/lib.rs
@@ -215,8 +215,8 @@ fn tests_impl(args: TokenStream, input: TokenStream) -> parse::Result<TokenStrea
unsafe {
::rtt_target::set_print_channel_cs(
channels.up.0,
- &((|arg, f| cortex_m::interrupt::free(|_| f(arg)))
- as rtt_target::CriticalSectionFunc),
+ &((|arg, f| ::critical_section::with(|_| f(arg)))
+ as ::rtt_target::CriticalSectionFunc),
);
}
});