From e0a1217f20908c3e6f01bdc413cef1640e1c59d1 Mon Sep 17 00:00:00 2001 From: Ludwig Ortmann Date: Wed, 26 Mar 2014 14:46:25 +0100 Subject: [PATCH 1/2] native: refactor one debug/errx use in irq_cpu.c --- cpu/native/irq_cpu.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/cpu/native/irq_cpu.c b/cpu/native/irq_cpu.c index 733fbed6c8..ac9ab3a43b 100644 --- a/cpu/native/irq_cpu.c +++ b/cpu/native/irq_cpu.c @@ -272,8 +272,7 @@ void native_irq_handler(void) DEBUG("ignoring SIGUSR1\n"); } else { - DEBUG("XXX: no handler for signal %i\n", sig); - errx(1, "XXX: this should not have happened!\n"); + errx(EXIT_FAILURE, "XXX: no handler for signal %i\nXXX: this should not have happened!\n", sig); } } From b43fa2327ea561248a1a3675b77c5131b51c6ab6 Mon Sep 17 00:00:00 2001 From: Ludwig Ortmann Date: Thu, 15 May 2014 11:34:54 +0200 Subject: [PATCH 2/2] native/tramp.S: use ret instead of manual return --- cpu/native/tramp.S | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/cpu/native/tramp.S b/cpu/native/tramp.S index 729f030d43..25f6de0a74 100644 --- a/cpu/native/tramp.S +++ b/cpu/native/tramp.S @@ -18,8 +18,7 @@ __native_sig_leave_tramp: popal popfl - popl __native_saved_eip - jmp *-4(%esp) + ret #else .extern $_native_saved_eip .extern $_native_isr_ctx @@ -44,6 +43,5 @@ _native_sig_leave_tramp: popal popfl - popl _native_saved_eip - jmp *-4(%esp) + ret #endif