Line | |
---|
1 | #ifndef __ASM_SYSTEM_H
|
---|
2 | #define __ASM_SYSTEM_H
|
---|
3 |
|
---|
4 | #include <linux/kernel.h>
|
---|
5 | #include <asm/segment.h>
|
---|
6 |
|
---|
7 | #ifdef __KERNEL__
|
---|
8 |
|
---|
9 | struct task_struct; /* one of the stranger aspects of C forward declarations.. */
|
---|
10 | extern void FASTCALL(__switch_to(struct task_struct *prev, struct task_struct *next));
|
---|
11 |
|
---|
12 | /*
|
---|
13 | * disable hlt during certain critical i/o operations
|
---|
14 | */
|
---|
15 | #define HAVE_DISABLE_HLT
|
---|
16 | void disable_hlt(void);
|
---|
17 | void enable_hlt(void);
|
---|
18 |
|
---|
19 | void save_flags(u32 *flags);
|
---|
20 | #pragma aux save_flags = \
|
---|
21 | "pushfd" \
|
---|
22 | "mov dword ptr [eax], edx" \
|
---|
23 | modify [edx] \
|
---|
24 | parm [eax];
|
---|
25 |
|
---|
26 | void restore_flags(u32 flags);
|
---|
27 | #pragma aux restore_flags = \
|
---|
28 | "push eax" \
|
---|
29 | "popfd" \
|
---|
30 | parm [eax];
|
---|
31 |
|
---|
32 | #define cli() _asm cli;
|
---|
33 | #define sti() _asm sti;
|
---|
34 |
|
---|
35 | #endif
|
---|
36 | #endif
|
---|
Note:
See
TracBrowser
for help on using the repository browser.