XyrisOS/xyris

Investigate Rewriting Interrupt/Exception Handlers Purely in C/C++

Opened this issue · 1 comments

struct interrupt_frame;

__attribute__ ((interrupt))
void
f (struct interrupt_frame *frame)
{
}
#ifdef __x86_64__
typedef unsigned long long int uword_t;
#else
typedef unsigned int uword_t;
#endif

struct interrupt_frame;

__attribute__ ((interrupt))
void
f (struct interrupt_frame *frame, uword_t error_code)
{
  ...
}

https://gcc.gnu.org/onlinedocs/gcc/x86-Function-Attributes.html

As much as I would like to use this, unfortunately there's no way to differentiate interrupts from one another using this method, unless we want to do something similar to what we're already doing in assembly where we have a separate function for each interrupt/exception.

That might be worth doing, but it wouldn't really gain us anything (other than removing more assembly).