Simple Operating System
interrupts.h
Go to the documentation of this file.
1 
13 #ifndef INTERRUPTS_H
14 #define INTERRUPTS_H
15 
16 #ifndef KERNEL
17 #error Only kernel should use this file!
18 #endif
19 
20 #include "types.h"
21 
22 extern int setInterrupts();
23 extern int addInterrupt(int number, int function);
24 
29 typedef struct interruptFrame {
30  Word ip;
31  Word cs;
32  Word flags;
33  Word sp;
34  Word ss;
36 
37 #define __int __attribute__((interrupt))
38 
42 #define IF 1<<9
43 
51 #define EOI() asm("out 0x20, al"::"a"(0x20));
52 #define REBOOT() asm("out 0x64, al"::"a"(0xfE));
53 #endif
void addInterrupt(number, function)
add interruption
int setInterrupts()
Set system interruptions.
struct interruptFrame interruptFrame
frame for interruption, required by gcc for __int
frame for interruption, required by gcc for __int
Definition: interrupts.h:29
useful macros, definitions, enums etc.