We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 8279b63 commit e451dc3Copy full SHA for e451dc3
cortex-m/src/register/primask.rs
@@ -51,6 +51,13 @@ pub fn read_raw() -> u32 {
51
52
/// Writes the entire PRIMASK register
53
/// Note that bits [31:1] are reserved and SBZP (Should-Be-Zero-or-Preserved)
54
+///
55
+/// # Safety
56
57
+/// This method is unsafe as other unsafe code may rely on interrupts remaining disabled, for
58
+/// example during a critical section, and being able to safely re-enable them would lead to
59
+/// undefined behaviour. Do not call this function in a context where interrupts are expected to
60
+/// remain disabled -- for example, in the midst of a critical section or `interrupt::free()` call.
61
#[cfg(cortex_m)]
62
#[inline]
63
pub unsafe fn write_raw(r: u32) {
0 commit comments