source: GPL/include/asm/system.h@ 18

Last change on this file since 18 was 18, checked in by vladest, 20 years ago

initial import

File size: 777 bytes
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
9struct task_struct; /* one of the stranger aspects of C forward declarations.. */
10extern 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
16void disable_hlt(void);
17void enable_hlt(void);
18
19void save_flags(u32 *flags);
20#pragma aux save_flags = \
21 "pushfd" \
22 "mov dword ptr [eax], edx" \
23 modify [edx] \
24 parm [eax];
25
26void 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.