24 lines
524 B
C
24 lines
524 B
C
|
#ifndef _ISR_H
|
||
|
#define _ISR_H
|
||
|
|
||
|
#include <types.h>
|
||
|
|
||
|
typedef struct {
|
||
|
uint32_t ds, edi, esi, ebp, esp, ebx, edx, ecx, eax;
|
||
|
uint32_t int_no, err_code;
|
||
|
uint32_t eip, cs, eflags, useresp, ss;
|
||
|
} regs_t;
|
||
|
|
||
|
typedef struct {
|
||
|
uint32_t ds;
|
||
|
uint32_t edi, esi, ebp, esp, ebx, edx, ecx, eax;
|
||
|
uint32_t int_no, err_code;
|
||
|
uint32_t eip, cs, eflags, useresp, ss;
|
||
|
} isr_stack_t;
|
||
|
|
||
|
void isr_handler(isr_stack_t *r);
|
||
|
void syscall_handler(regs_t *r);
|
||
|
void register_interrupt_handler(uint8_t n, void (*handler)(isr_stack_t *));
|
||
|
|
||
|
#endif
|