Untitled_Kernel/include/interrupt_handlers.h
lordtet 7b4e4afd43 Defined a couple of functions, added documentation templates
Didn't feel the need to make a new branch for this one, but i added some
doxygen documentation templates to all of the headers. It's a bit
overdue.
2025-07-17 07:36:45 -04:00

31 lines
734 B
C

/**
* @file interrupt_handlers.h
* @brief Interrupt Handlers
* @details Functions and structs for the C side of handling interrupts.
*/
#ifndef INTERRUPTHANDLERS_H
#define INTERRUPTHANDLERS_H
#include <stdint.h>
/**
* @brief
*/
extern void (*isr_ptrs[])(void);
/**
* @brief
* @details Struct is built "backwards" since it is pushed in this order.
*/
typedef struct StateSnapshot_s {
uint32_t edi, esi, ebp, esp, ebx, edx, ecx, eax; /**< @brief */
uint32_t interrupt_id, error_code; /**< @brief */
uint32_t eip, cs, eflags; /**< @brief */
} StateSnapshot_t;
/**
* @brief
* @param cpu_state
*/
void generic_isr_handler(StateSnapshot_t* cpu_state);
#endif