aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorEmil Fresk <emil.fresk@gmail.com>2022-04-20 13:02:55 +0200
committerEmil Fresk <emil.fresk@gmail.com>2022-04-20 13:05:22 +0200
commit0f8bdbdd3f2739e37d788493cb83cf2d9c557f4e (patch)
tree42fe0077801e832320d23322f2259332e6d88d1f /src
parent9f38a39377a7ff03d0f4371feda083ba09064f5e (diff)
Added check for resource usage and to generate an compile error for thumbv6 exceptions
Diffstat (limited to 'src')
-rw-r--r--src/export.rs10
1 files changed, 10 insertions, 0 deletions
diff --git a/src/export.rs b/src/export.rs
index 0358991..42f3fe2 100644
--- a/src/export.rs
+++ b/src/export.rs
@@ -339,3 +339,13 @@ pub const fn create_mask<const N: usize>(list_of_shifts: [u32; N]) -> u32 {
mask
}
+
+#[cfg(not(armv6m))]
+pub const fn v6_panic() {
+ // For non-v6 all is fine
+}
+
+#[cfg(armv6m)]
+pub const fn v6_panic() {
+ panic!("Exceptions with shared resources are not allowed when compiling for thumbv6. Use local resources or `#[lock_free]` shared resources");
+}