Re-enabled use of AROS.Boot file due to lack of general enthusiasm for
[tangerine.git] / arch / i386-pc / exec / traps.h
blob2563d34dba96639cb9de80b4733630082368a5a6
1 #ifndef _TRAPS_H
2 #define _TRAPS_H
4 #include <asm/irq.h>
5 #include <asm/linkage.h>
7 /* Here are some macros used to build trap table in core file. */
9 #define TRAP_NAME2(nr) nr##_trap(void)
10 #define TRAP_NAME(nr) TRAP_NAME2(TRAP##nr)
12 #define BUILD_COMMON_TRAP() \
13 __asm__( \
14 "\n"__ALIGN_STR"\n" \
15 "common_trap:\n\t" \
16 SAVE_REGS \
17 "call "SYMBOL_NAME_STR(do_TRAP)"\n\t"\
18 RESTORE_REGS \
19 "iret\n");
21 #define BUILD_TRAP(nr) \
22 asmlinkage void TRAP_NAME(nr); \
23 __asm__( \
24 "\n"__ALIGN_STR"\n" \
25 SYMBOL_NAME_STR(TRAP) #nr "_trap:\n\t" \
26 "pushl $"#nr"\n\t" \
27 "jmp common_trap");
29 void set_intr_gate(unsigned int n, void *addr);
30 void set_system_gate(unsigned int n, void *addr);
32 void Init_Traps(void);
34 #endif /* _TRAPS_H */