Added some packing stuff for GCC
This commit is contained in:
parent
f00c44ac89
commit
87f8040eb2
1 changed files with 13 additions and 0 deletions
|
@ -1,6 +1,15 @@
|
||||||
#ifndef _KERNEL_INTERRUPT
|
#ifndef _KERNEL_INTERRUPT
|
||||||
#define _KERNEL_INTERRUPT
|
#define _KERNEL_INTERRUPT
|
||||||
|
|
||||||
|
#ifdef __GNUC__
|
||||||
|
struct IDT_entry {
|
||||||
|
unsigned short int offset_lowerbits;
|
||||||
|
unsigned short int selector;
|
||||||
|
unsigned char zero;
|
||||||
|
unsigned char type_attr;
|
||||||
|
unsigned short int offset_higherbits;
|
||||||
|
} __attribute__((packed));
|
||||||
|
#else
|
||||||
struct IDT_entry {
|
struct IDT_entry {
|
||||||
unsigned short int offset_lowerbits;
|
unsigned short int offset_lowerbits;
|
||||||
unsigned short int selector;
|
unsigned short int selector;
|
||||||
|
@ -8,7 +17,11 @@ struct IDT_entry {
|
||||||
unsigned char type_attr;
|
unsigned char type_attr;
|
||||||
unsigned short int offset_higherbits;
|
unsigned short int offset_higherbits;
|
||||||
};
|
};
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#ifdef __GNUC__
|
||||||
|
__attribute((aligned(0x10)))
|
||||||
|
#endif
|
||||||
struct IDT_entry IDT[256];
|
struct IDT_entry IDT[256];
|
||||||
|
|
||||||
void idt_init(void);
|
void idt_init(void);
|
||||||
|
|
Loading…
Reference in a new issue