github.com/tinygo-org/tinygo@v0.31.3-0.20240404173401-90b0bf646c27/src/device/arm/interrupts.c (about) 1 #include <stdint.h> 2 3 void EnableInterrupts(uintptr_t mask) { 4 asm volatile( 5 "msr PRIMASK, %0" 6 : 7 : "r"(mask) 8 : "memory" 9 ); 10 } 11 12 uintptr_t DisableInterrupts() { 13 uintptr_t mask; 14 asm volatile( 15 "mrs %0, PRIMASK\n\t" 16 "cpsid i" 17 : "=r"(mask) 18 : 19 : "memory" 20 ); 21 return mask; 22 }