#include <list.h>
#include <register.h>
Go to the source code of this file.
Data Structures | |
struct | ExceptionHandler |
struct | InterruptHandler |
Defines | |
#define | INTERRUPT_STACK_SIZE (16 * 1024) |
#define | INTERRUPT_STUB_SIZE 16 |
#define | INTERRUPT_VECTOR_EXCEPTIONS 0 |
#define | INTERRUPT_VECTOR_INTERRUPTS 32 |
#define | INTERRUPT_VECTOR_TRAPS 48 |
#define | INTERRUPT_VECTOR_MAXIMUM 99 |
Typedefs | |
typedef char | InterruptStub [16] |
typedef unsigned int | InterruptVector |
typedef void(* | InterruptHandlerFunction )(InterruptVector, Registers *) |
typedef unsigned int | ExceptionVector |
typedef unsigned int | ExceptionData |
typedef void(* | ExceptionHandlerFunction )(ExceptionVector, ExceptionData, Registers *) |
Functions | |
int | interrupt_dispatcher_initialize (void) |
Initialize the interrupt dispatcher. | |
InterruptHandler * | interrupt_handler_create (InterruptVector vector, InterruptHandlerFunction handler) |
Create a new interrupt handler. | |
void | interrupt_handler_destroy (InterruptHandler *handler) |
Destroy an interrupt handler. | |
ExceptionHandler * | exception_handler_create (ExceptionVector vector, ExceptionHandlerFunction handler) |
Create a new exception handler. | |
void | exception_handler_destroy (ExceptionHandler *handler) |
Destroy an exception handler. | |
void | interrupt_wait (void) |
Wait for any interrupts. | |
Variables | |
InterruptStub | interrupt_stubs [] |
Provides the interface for interrupt handling.
|
Create a new exception handler. Create a new handler for the specified exception vector, with a given handler function.
|
|
Destroy an exception handler. Removes an exception handler and frees any memory it used.
|
|
Initialize the interrupt dispatcher. Initialize the IDT with the interrupt stubs and the handler lists.
|
|
Create a new interrupt handler. Create a new handler for the specified interrupt vector, with a given handler function.
|
|
Destroy an interrupt handler. Removes an interrupt handler and frees any memory it used.
|
|
Wait for any interrupts. Halt the kernel until an interrupt occurs.
|