summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorIan Moffett <ian@osmora.org>2024-02-18 21:39:33 -0500
committerIan Moffett <ian@osmora.org>2024-02-18 21:39:33 -0500
commitb9ac16de634e04b92d5a050381a363ed1d4aeb52 (patch)
treea922b5ebccc2b0496fff46f9a9ed95db8534dfd1
parent337df873ef9e9349e2c60feeac453823335aa9d8 (diff)
kernel/amd64: trap: Remove useless function
Signed-off-by: Ian Moffett <ian@osmora.org>
-rw-r--r--sys/arch/amd64/amd64/trap.c13
-rw-r--r--sys/include/arch/amd64/trap.h1
2 files changed, 0 insertions, 14 deletions
diff --git a/sys/arch/amd64/amd64/trap.c b/sys/arch/amd64/amd64/trap.c
index 44482b7..85d1058 100644
--- a/sys/arch/amd64/amd64/trap.c
+++ b/sys/arch/amd64/amd64/trap.c
@@ -48,8 +48,6 @@ static const char *trap_type[] = {
};
static const int TRAP_COUNT = __ARRAY_COUNT(trap_type);
-static ftrap_handler_t ftrap_handler = NULL;
-static struct spinlock ftrap_handler_lock = { 0 };
static void
trap_print(struct trapframe *tf)
@@ -66,17 +64,6 @@ trap_print(struct trapframe *tf)
}
/*
- * Registers a handler for *fatal* traps.
- */
-void
-register_ftrap_handler(ftrap_handler_t handler)
-{
- spinlock_acquire(&ftrap_handler_lock);
- ftrap_handler = handler;
- spinlock_release(&ftrap_handler_lock);
-}
-
-/*
* Handles traps.
*/
void
diff --git a/sys/include/arch/amd64/trap.h b/sys/include/arch/amd64/trap.h
index dc3baba..1019999 100644
--- a/sys/include/arch/amd64/trap.h
+++ b/sys/include/arch/amd64/trap.h
@@ -65,7 +65,6 @@ void segnp(void *sf);
void general_prot(void *sf);
void page_fault(void *sf);
void nmi(void *sf);
-void register_ftrap_handler(ftrap_handler_t handler);
void trap_handler(struct trapframe *tf);
#else
.macro handle_trap