diff options
author | Al Viro <viro@ftp.linux.org.uk> | 2011-08-18 21:14:00 +0200 |
---|---|---|
committer | Richard Weinberger <richard@nod.at> | 2011-11-02 14:15:34 +0100 |
commit | a34978cbd977ab62c744f63daacd9dc1474482be (patch) | |
tree | 0d1ec8a6a1efb5fe18d3afbbe8ca187d2db30b6b /arch/um/include | |
parent | um: generic ftrace.h will do... (diff) | |
download | linux-a34978cbd977ab62c744f63daacd9dc1474482be.tar.xz linux-a34978cbd977ab62c744f63daacd9dc1474482be.zip |
um: kill system-um.h
most of it belonged in irqflags.h, actually
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Signed-off-by: Richard Weinberger <richard@nod.at>
Diffstat (limited to 'arch/um/include')
-rw-r--r-- | arch/um/include/asm/irqflags.h | 38 | ||||
-rw-r--r-- | arch/um/include/asm/system-um.h | 45 |
2 files changed, 37 insertions, 46 deletions
diff --git a/arch/um/include/asm/irqflags.h b/arch/um/include/asm/irqflags.h index 659b9abdfdba..c780d8a16773 100644 --- a/arch/um/include/asm/irqflags.h +++ b/arch/um/include/asm/irqflags.h @@ -1,6 +1,42 @@ #ifndef __UM_IRQFLAGS_H #define __UM_IRQFLAGS_H -/* Empty for now */ +extern int get_signals(void); +extern int set_signals(int enable); +extern void block_signals(void); +extern void unblock_signals(void); + +static inline unsigned long arch_local_save_flags(void) +{ + return get_signals(); +} + +static inline void arch_local_irq_restore(unsigned long flags) +{ + set_signals(flags); +} + +static inline void arch_local_irq_enable(void) +{ + unblock_signals(); +} + +static inline void arch_local_irq_disable(void) +{ + block_signals(); +} + +static inline unsigned long arch_local_irq_save(void) +{ + unsigned long flags; + flags = arch_local_save_flags(); + arch_local_irq_disable(); + return flags; +} + +static inline bool arch_irqs_disabled(void) +{ + return arch_local_save_flags() == 0; +} #endif diff --git a/arch/um/include/asm/system-um.h b/arch/um/include/asm/system-um.h deleted file mode 100644 index 0eec24579288..000000000000 --- a/arch/um/include/asm/system-um.h +++ /dev/null @@ -1,45 +0,0 @@ -#ifndef __UM_SYSTEM_GENERIC_H -#define __UM_SYSTEM_GENERIC_H - -extern int get_signals(void); -extern int set_signals(int enable); -extern void block_signals(void); -extern void unblock_signals(void); - -static inline unsigned long arch_local_save_flags(void) -{ - return get_signals(); -} - -static inline void arch_local_irq_restore(unsigned long flags) -{ - set_signals(flags); -} - -static inline void arch_local_irq_enable(void) -{ - unblock_signals(); -} - -static inline void arch_local_irq_disable(void) -{ - block_signals(); -} - -static inline unsigned long arch_local_irq_save(void) -{ - unsigned long flags; - flags = arch_local_save_flags(); - arch_local_irq_disable(); - return flags; -} - -static inline bool arch_irqs_disabled(void) -{ - return arch_local_save_flags() == 0; -} - -extern void *_switch_to(void *prev, void *next, void *last); -#define switch_to(prev, next, last) prev = _switch_to(prev, next, last) - -#endif |