From 7f1db86ae265df64694f492ec4b726ee242a0384 Mon Sep 17 00:00:00 2001 From: Ludwig Ortmann Date: Wed, 29 Jan 2014 10:54:52 +0100 Subject: [PATCH] handle some should-be impossible paths --- cpu/native/native_cpu.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/cpu/native/native_cpu.c b/cpu/native/native_cpu.c index df669a6f98..e0dcaf8a66 100644 --- a/cpu/native/native_cpu.c +++ b/cpu/native/native_cpu.c @@ -127,6 +127,7 @@ void isr_cpu_switch_context_exit(void) if (setcontext(ctx) == -1) { err(EXIT_FAILURE, "cpu_switch_context_exit(): setcontext():"); } + errx(EXIT_FAILURE, "2 this should have never been reached!!"); } void cpu_switch_context_exit() @@ -141,11 +142,12 @@ void cpu_switch_context_exit() if (setcontext(&native_isr_context) == -1) { err(EXIT_FAILURE, "cpu_switch_context_exit: swapcontext"); } + errx(EXIT_FAILURE, "1 this should have never been reached!!"); } else { isr_cpu_switch_context_exit(); } - errx(EXIT_FAILURE, "this should have never been reached!!"); + errx(EXIT_FAILURE, "3 this should have never been reached!!"); } void isr_thread_yield()