Merge branch 'next' of git://selinuxproject.org/~jmorris/linux-security
[linux-btrfs-devel.git] / arch / um / include / asm / system.h
blob68a90ecd14501aaaeb4a832364c58c89c1697d59
1 #ifndef __UM_SYSTEM_GENERIC_H
2 #define __UM_SYSTEM_GENERIC_H
4 #include "sysdep/system.h"
6 extern int get_signals(void);
7 extern int set_signals(int enable);
8 extern void block_signals(void);
9 extern void unblock_signals(void);
11 static inline unsigned long arch_local_save_flags(void)
13 return get_signals();
16 static inline void arch_local_irq_restore(unsigned long flags)
18 set_signals(flags);
21 static inline void arch_local_irq_enable(void)
23 unblock_signals();
26 static inline void arch_local_irq_disable(void)
28 block_signals();
31 static inline unsigned long arch_local_irq_save(void)
33 unsigned long flags;
34 flags = arch_local_save_flags();
35 arch_local_irq_disable();
36 return flags;
39 static inline bool arch_irqs_disabled(void)
41 return arch_local_save_flags() == 0;
44 extern void *_switch_to(void *prev, void *next, void *last);
45 #define switch_to(prev, next, last) prev = _switch_to(prev, next, last)
47 #endif