Commit 3e938957 authored by Daniel Wagner's avatar Daniel Wagner Committed by Richard Weinberger

um: Use asm-generic/irqflags.h

Instead proving its own arch_local_irq_save() and arch_irqs_disabled()
version use the generic version from asm-generic/irqflags.h.

A nice side effect is that um gets a few additional arch_ functions
as well.
Signed-off-by: default avatarDaniel Wagner <daniel.wagner@bmw-carit.de>
[rw: Massaged commit message]
Signed-off-by: default avatarRichard Weinberger <richard@nod.at>
parent 57a05d83
...@@ -6,37 +6,33 @@ extern int set_signals(int enable); ...@@ -6,37 +6,33 @@ extern int set_signals(int enable);
extern void block_signals(void); extern void block_signals(void);
extern void unblock_signals(void); extern void unblock_signals(void);
#define arch_local_save_flags arch_local_save_flags
static inline unsigned long arch_local_save_flags(void) static inline unsigned long arch_local_save_flags(void)
{ {
return get_signals(); return get_signals();
} }
#define arch_local_irq_restore arch_local_irq_restore
static inline void arch_local_irq_restore(unsigned long flags) static inline void arch_local_irq_restore(unsigned long flags)
{ {
set_signals(flags); set_signals(flags);
} }
#define arch_local_irq_enable arch_local_irq_enable
static inline void arch_local_irq_enable(void) static inline void arch_local_irq_enable(void)
{ {
unblock_signals(); unblock_signals();
} }
#define arch_local_irq_disable arch_local_irq_disable
static inline void arch_local_irq_disable(void) static inline void arch_local_irq_disable(void)
{ {
block_signals(); block_signals();
} }
static inline unsigned long arch_local_irq_save(void) #define ARCH_IRQ_DISABLED 0
{ #define ARCh_IRQ_ENABLED (SIGIO|SIGVTALRM)
unsigned long flags;
flags = arch_local_save_flags();
arch_local_irq_disable();
return flags;
}
static inline bool arch_irqs_disabled(void) #include <asm-generic/irqflags.h>
{
return arch_local_save_flags() == 0;
}
#endif #endif
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment