source: GPL/trunk/include/asm/system.h@ 689

Last change on this file since 689 was 679, checked in by David Azarewicz, 4 years ago

Merge changes from Paul's uniaud32next branch.

File size: 905 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#endif
35
36#define smp_mb() barrier()
37#define smp_rmb() barrier()
38#define smp_wmb() barrier()
39#define smp_mb__after_atomic() barrier()
40#endif
Note: See TracBrowser for help on using the repository browser.