mirror of
https://github.com/cfenollosa/os-tutorial.git
synced 2025-12-18 04:44:35 +03:00
lesson 23, step 3
This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
#ifndef ISR_H
|
||||
#define ISR_H
|
||||
|
||||
#include "type.h"
|
||||
#include <stdint.h>
|
||||
|
||||
/* ISRs reserved for CPU exceptions */
|
||||
extern void isr0();
|
||||
@@ -73,10 +73,10 @@ extern void irq15();
|
||||
|
||||
/* Struct which aggregates many registers */
|
||||
typedef struct {
|
||||
u32 ds; /* Data segment selector */
|
||||
u32 edi, esi, ebp, esp, ebx, edx, ecx, eax; /* Pushed by pusha. */
|
||||
u32 int_no, err_code; /* Interrupt number and error code (if applicable) */
|
||||
u32 eip, cs, eflags, useresp, ss; /* Pushed by the processor automatically */
|
||||
uint32_t ds; /* Data segment selector */
|
||||
uint32_t edi, esi, ebp, esp, ebx, edx, ecx, eax; /* Pushed by pusha. */
|
||||
uint32_t int_no, err_code; /* Interrupt number and error code (if applicable) */
|
||||
uint32_t eip, cs, eflags, useresp, ss; /* Pushed by the processor automatically */
|
||||
} registers_t;
|
||||
|
||||
void isr_install();
|
||||
@@ -84,6 +84,6 @@ void isr_handler(registers_t r);
|
||||
void irq_install();
|
||||
|
||||
typedef void (*isr_t)(registers_t);
|
||||
void register_interrupt_handler(u8 n, isr_t handler);
|
||||
void register_interrupt_handler(uint8_t n, isr_t handler);
|
||||
|
||||
#endif
|
||||
|
||||
Reference in New Issue
Block a user