diff --git a/soc/runtime/exceptions.c b/soc/runtime/exceptions.c index 294c764db..aa6b8a88a 100644 --- a/soc/runtime/exceptions.c +++ b/soc/runtime/exceptions.c @@ -17,9 +17,9 @@ void *exception_push(void) return exception_contexts[ec_top++].jb; } -void exception_pop(void) +void exception_pop(int levels) { - ec_top--; + ec_top -= levels; } int exception_getid(void) diff --git a/soc/runtime/exceptions.h b/soc/runtime/exceptions.h index d3024855c..1011f0d50 100644 --- a/soc/runtime/exceptions.h +++ b/soc/runtime/exceptions.h @@ -6,7 +6,7 @@ enum { }; void *exception_push(void); -void exception_pop(void); +void exception_pop(int levels); int exception_getid(void); void exception_raise(int id) __attribute__((noreturn)); diff --git a/soc/runtime/main.c b/soc/runtime/main.c index 1e4918e05..6c45a72b8 100644 --- a/soc/runtime/main.c +++ b/soc/runtime/main.c @@ -84,7 +84,7 @@ static int run_kernel(const char *kernel_name, int *eid) rtio_init(); flush_cpu_icache(); k(); - exception_pop(); + exception_pop(1); return KERNEL_RUN_FINISHED; } }