diff options
author | Andreas Baumann <mail@andreasbaumann.cc> | 2017-06-01 19:14:44 +0200 |
---|---|---|
committer | Andreas Baumann <mail@andreasbaumann.cc> | 2017-06-01 19:14:44 +0200 |
commit | ec014db9fa3f6b5b7ad3491c20f2c2a65c56a7a6 (patch) | |
tree | 6b645b6be055be47a8f5dbf22ae1c191386148e8 /src/interrupts.h | |
parent | 15a2290a168fa9de80256bb7cefe13384ae3e58b (diff) | |
download | abaos-ec014db9fa3f6b5b7ad3491c20f2c2a65c56a7a6.tar.gz abaos-ec014db9fa3f6b5b7ad3491c20f2c2a65c56a7a6.tar.bz2 |
introducted a interrupt handler object
Diffstat (limited to 'src/interrupts.h')
-rw-r--r-- | src/interrupts.h | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/src/interrupts.h b/src/interrupts.h index 0cdb6cc..82f95f4 100644 --- a/src/interrupts.h +++ b/src/interrupts.h @@ -43,7 +43,16 @@ typedef struct { struct interrupt_t; -typedef uint32_t (*interrupt_handler_t)( struct interrupt_t *interrupt, uint32_t esp ); +typedef uint32_t (*interrupt_handler_func_t)( struct interrupt_t *interrupt, uint32_t esp ); + +typedef struct interrupt_handler_t { + uint8_t interrupt_no; + struct interrupt_t *interrupt; + interrupt_handler_func_t handle; +} interrupt_handler_t; + +void interrupt_handler_init_void( interrupt_handler_t *handler ); +void interrupt_handler_init( interrupt_handler_t *handler, uint8_t interrupt_no, struct interrupt_t *interrupt, interrupt_handler_func_t handle ); typedef struct interrupt_t { interrupt_descriptor_table_pointer_t idt_pointer; |