From 0a02d9fb780907e2493c6fea412814bff8e6e3f5 Mon Sep 17 00:00:00 2001 From: Sebastien Bourdeauducq Date: Tue, 23 Sep 2014 16:22:32 +0800 Subject: [PATCH] soc/runtime: add levels to exception_pop --- soc/runtime/exceptions.c | 4 ++-- soc/runtime/exceptions.h | 2 +- soc/runtime/main.c | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) 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; } }