15 lines
436 B
C
15 lines
436 B
C
|
#ifndef __GILBRALTAR_SYNCHRONIZE__
|
||
|
#define __GILBRALTAR_SYNCHRONIZE__
|
||
|
|
||
|
#define enable_fiqs() __asm__ __volatile("msr DAIFClr, #1")
|
||
|
#define disable_fiqs() __asm__ __volatile("msr DAIFSet, #1")
|
||
|
#define enable_irqs() __asm__ __volatile("msr DAIFClr, #2")
|
||
|
#define disable_irqs() __asm__ __volatile("msr DAIFSet, #2")
|
||
|
|
||
|
enum level { TASK, IRQ, FIQ };
|
||
|
|
||
|
void gilbraltar_enter_critical(enum level);
|
||
|
void gilbraltar_leave_critical(void);
|
||
|
|
||
|
#endif
|