We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent ec3483b commit ab699deCopy full SHA for ab699de
src/asm.rs
@@ -86,18 +86,23 @@ pub fn nop() {
86
///
87
/// Can be used as a stable alternative to `core::intrinsics::abort`.
88
#[inline]
89
-pub fn udf() {
+pub fn udf() -> ! {
90
match () {
91
#[cfg(all(cortex_m, feature = "inline-asm"))]
92
- () => unsafe { asm!("udf" :::: "volatile") },
+ () => unsafe {
93
+ asm!("udf" :::: "volatile");
94
+ loop { continue }
95
+ },
96
97
#[cfg(all(cortex_m, not(feature = "inline-asm")))]
98
() => unsafe {
99
extern "C" {
100
fn __udf();
101
}
102
- __udf()
103
+ __udf();
104
+
105
106
},
107
108
#[cfg(not(cortex_m))]
0 commit comments