diff options
author | Glenn Elliott <gelliott@cs.unc.edu> | 2012-03-04 19:47:13 -0500 |
---|---|---|
committer | Glenn Elliott <gelliott@cs.unc.edu> | 2012-03-04 19:47:13 -0500 |
commit | c71c03bda1e86c9d5198c5d83f712e695c4f2a1e (patch) | |
tree | ecb166cb3e2b7e2adb3b5e292245fefd23381ac8 /arch/um/include/asm/system.h | |
parent | ea53c912f8a86a8567697115b6a0d8152beee5c8 (diff) | |
parent | 6a00f206debf8a5c8899055726ad127dbeeed098 (diff) |
Merge branch 'mpi-master' into wip-k-fmlpwip-k-fmlp
Conflicts:
litmus/sched_cedf.c
Diffstat (limited to 'arch/um/include/asm/system.h')
-rw-r--r-- | arch/um/include/asm/system.h | 49 |
1 files changed, 32 insertions, 17 deletions
diff --git a/arch/um/include/asm/system.h b/arch/um/include/asm/system.h index 93af1cf0907d..68a90ecd1450 100644 --- a/arch/um/include/asm/system.h +++ b/arch/um/include/asm/system.h | |||
@@ -8,23 +8,38 @@ extern int set_signals(int enable); | |||
8 | extern void block_signals(void); | 8 | extern void block_signals(void); |
9 | extern void unblock_signals(void); | 9 | extern void unblock_signals(void); |
10 | 10 | ||
11 | #define local_save_flags(flags) do { typecheck(unsigned long, flags); \ | 11 | static inline unsigned long arch_local_save_flags(void) |
12 | (flags) = get_signals(); } while(0) | 12 | { |
13 | #define local_irq_restore(flags) do { typecheck(unsigned long, flags); \ | 13 | return get_signals(); |
14 | set_signals(flags); } while(0) | 14 | } |
15 | 15 | ||
16 | #define local_irq_save(flags) do { local_save_flags(flags); \ | 16 | static inline void arch_local_irq_restore(unsigned long flags) |
17 | local_irq_disable(); } while(0) | 17 | { |
18 | 18 | set_signals(flags); | |
19 | #define local_irq_enable() unblock_signals() | 19 | } |
20 | #define local_irq_disable() block_signals() | 20 | |
21 | 21 | static inline void arch_local_irq_enable(void) | |
22 | #define irqs_disabled() \ | 22 | { |
23 | ({ \ | 23 | unblock_signals(); |
24 | unsigned long flags; \ | 24 | } |
25 | local_save_flags(flags); \ | 25 | |
26 | (flags == 0); \ | 26 | static inline void arch_local_irq_disable(void) |
27 | }) | 27 | { |
28 | block_signals(); | ||
29 | } | ||
30 | |||
31 | static inline unsigned long arch_local_irq_save(void) | ||
32 | { | ||
33 | unsigned long flags; | ||
34 | flags = arch_local_save_flags(); | ||
35 | arch_local_irq_disable(); | ||
36 | return flags; | ||
37 | } | ||
38 | |||
39 | static inline bool arch_irqs_disabled(void) | ||
40 | { | ||
41 | return arch_local_save_flags() == 0; | ||
42 | } | ||
28 | 43 | ||
29 | extern void *_switch_to(void *prev, void *next, void *last); | 44 | extern void *_switch_to(void *prev, void *next, void *last); |
30 | #define switch_to(prev, next, last) prev = _switch_to(prev, next, last) | 45 | #define switch_to(prev, next, last) prev = _switch_to(prev, next, last) |