Linux Kernel  3.7.1
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
irqflags.h
Go to the documentation of this file.
1 #ifndef __ASM_CRIS_ARCH_IRQFLAGS_H
2 #define __ASM_CRIS_ARCH_IRQFLAGS_H
3 
4 #include <linux/types.h>
5 
6 static inline unsigned long arch_local_save_flags(void)
7 {
8  unsigned long flags;
9  asm volatile("move $ccr,%0" : "=rm" (flags) : : "memory");
10  return flags;
11 }
12 
13 static inline void arch_local_irq_disable(void)
14 {
15  asm volatile("di" : : : "memory");
16 }
17 
18 static inline void arch_local_irq_enable(void)
19 {
20  asm volatile("ei" : : : "memory");
21 }
22 
23 static inline unsigned long arch_local_irq_save(void)
24 {
25  unsigned long flags = arch_local_save_flags();
27  return flags;
28 }
29 
30 static inline void arch_local_irq_restore(unsigned long flags)
31 {
32  asm volatile("move %0,$ccr" : : "rm" (flags) : "memory");
33 }
34 
35 static inline bool arch_irqs_disabled_flags(unsigned long flags)
36 {
37  return !(flags & (1 << 5));
38 }
39 
40 static inline bool arch_irqs_disabled(void)
41 {
43 }
44 
45 #endif /* __ASM_CRIS_ARCH_IRQFLAGS_H */