From b1c3ee27894d33d9fcfca4ea4d0ccfb6d4cfc83e Mon Sep 17 00:00:00 2001 From: Uros Majstorovic Date: Fri, 16 Mar 2018 14:15:39 +0100 Subject: fixed race conditions --- code/fe310/eos/interrupt.c | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'code/fe310/eos/interrupt.c') diff --git a/code/fe310/eos/interrupt.c b/code/fe310/eos/interrupt.c index b8c6540..28bd8d1 100644 --- a/code/fe310/eos/interrupt.c +++ b/code/fe310/eos/interrupt.c @@ -26,6 +26,12 @@ uintptr_t eos_intr_handle(uintptr_t int_num) { return int_num; } +void handle_m_ext_interrupt(void) { + plic_source int_num = PLIC_claim_interrupt(&plic); + eos_intr_handle(int_num); + PLIC_complete_interrupt(&plic, int_num); +} + void eos_intr_init(void) { for (int i = 0; i < PLIC_NUM_INTERRUPTS; i++){ ext_interrupt_handler[i] = NULL; -- cgit v1.2.3