From 31136437684b5987ef46f4c6947940cf96de75b3 Mon Sep 17 00:00:00 2001 From: Robert Morris Date: Wed, 5 Jun 2019 14:05:46 -0400 Subject: spinlocks using gcc intrinsics push_off() / pop_off() set up per-hart plic stuff so all harts get device interrupts --- trap.c | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) (limited to 'trap.c') diff --git a/trap.c b/trap.c index 693c596..929f761 100644 --- a/trap.c +++ b/trap.c @@ -19,12 +19,14 @@ extern int devintr(); void trapinit(void) { - int i; + initlock(&tickslock, "time"); +} - // set up to take exceptions and traps while in the kernel. +// set up to take exceptions and traps while in the kernel. +void +trapinithart(void) +{ w_stvec((uint64)kernelvec); - - initlock(&tickslock, "time"); } // -- cgit v1.2.3