X-Git-Url: https://scm.lunaixsky.com/lunaix-os.git/blobdiff_plain/32b9a6d76790c73d3d2d36d9081a2581cc65d184..28c176b668c841a3b7fb093faccf0efa39257603:/lunaix-os/arch/i386/exceptions/interrupts.c diff --git a/lunaix-os/arch/i386/exceptions/interrupts.c b/lunaix-os/arch/i386/exceptions/interrupts.c deleted file mode 100644 index d7eced3..0000000 --- a/lunaix-os/arch/i386/exceptions/interrupts.c +++ /dev/null @@ -1,57 +0,0 @@ -#include -#include -#include -#include "sys/x86_isa.h" - -#include "sys/x86_isa.h" - -#include -#include -#include -#include -#include - -LOG_MODULE("INTR") - -static inline void -update_thread_context(struct hart_state* state) -{ - if (!current_thread) { - return; - } - - struct hart_state* parent = current_thread->hstate; - hart_push_state(parent, state); - current_thread->hstate = state; - - if (parent) { - state->depth = parent->depth + 1; - } -} - -void -intr_handler(struct hart_state* state) -{ - update_thread_context(state); - - volatile struct exec_param* execp = state->execp; - if (execp->vector <= 255) { - isr_cb subscriber = isrm_get(execp->vector); - subscriber(state); - goto done; - } - - ERROR("INT %u: (%x) [%p: %p] Unknown", - execp->vector, - execp->err_code, - execp->cs, - execp->eip); - -done: - - if (execp->vector > IV_BASE_END) { - isrm_notify_eoi(0, execp->vector); - } - - return; -} \ No newline at end of file