aboutsummaryrefslogtreecommitdiffstats
path: root/include/asm-um/system-generic.h
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@ppc970.osdl.org>2005-04-16 18:20:36 -0400
committerLinus Torvalds <torvalds@ppc970.osdl.org>2005-04-16 18:20:36 -0400
commit1da177e4c3f41524e886b7f1b8a0c1fc7321cac2 (patch)
tree0bba044c4ce775e45a88a51686b5d9f90697ea9d /include/asm-um/system-generic.h
Linux-2.6.12-rc2v2.6.12-rc2
Initial git repository build. I'm not bothering with the full history, even though we have it. We can create a separate "historical" git archive of that later if we want to, and in the meantime it's about 3.2GB when imported into git - space that would just make the early git days unnecessarily complicated, when we don't have a lot of good infrastructure for it. Let it rip!
Diffstat (limited to 'include/asm-um/system-generic.h')
-rw-r--r--include/asm-um/system-generic.h47
1 files changed, 47 insertions, 0 deletions
diff --git a/include/asm-um/system-generic.h b/include/asm-um/system-generic.h
new file mode 100644
index 000000000000..5bcfa35e7a22
--- /dev/null
+++ b/include/asm-um/system-generic.h
@@ -0,0 +1,47 @@
1#ifndef __UM_SYSTEM_GENERIC_H
2#define __UM_SYSTEM_GENERIC_H
3
4#include "asm/arch/system.h"
5
6#undef switch_to
7#undef local_irq_save
8#undef local_irq_restore
9#undef local_irq_disable
10#undef local_irq_enable
11#undef local_save_flags
12#undef local_irq_restore
13#undef local_irq_enable
14#undef local_irq_disable
15#undef local_irq_save
16#undef irqs_disabled
17
18extern void *switch_to(void *prev, void *next, void *last);
19
20extern int get_signals(void);
21extern int set_signals(int enable);
22extern int get_signals(void);
23extern void block_signals(void);
24extern void unblock_signals(void);
25
26#define local_save_flags(flags) do { typecheck(unsigned long, flags); \
27 (flags) = get_signals(); } while(0)
28#define local_irq_restore(flags) do { typecheck(unsigned long, flags); \
29 set_signals(flags); } while(0)
30
31#define local_irq_save(flags) do { local_save_flags(flags); \
32 local_irq_disable(); } while(0)
33
34#define local_irq_enable() unblock_signals()
35#define local_irq_disable() block_signals()
36
37#define irqs_disabled() \
38({ \
39 unsigned long flags; \
40 local_save_flags(flags); \
41 (flags == 0); \
42})
43
44extern void *_switch_to(void *prev, void *next, void *last);
45#define switch_to(prev, next, last) prev = _switch_to(prev, next, last)
46
47#endif