From 83886d61c7c988944283517a18deaa197d3d40cb Mon Sep 17 00:00:00 2001 From: Ludwig Ortmann Date: Fri, 28 Nov 2014 12:08:51 +0100 Subject: [PATCH] native: start with interrupts disabled --- cpu/native/irq_cpu.c | 3 +-- cpu/native/startup.c | 2 ++ 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/cpu/native/irq_cpu.c b/cpu/native/irq_cpu.c index 80d34a9eb1..d56aa5c8c9 100644 --- a/cpu/native/irq_cpu.c +++ b/cpu/native/irq_cpu.c @@ -45,7 +45,7 @@ #define ENABLE_DEBUG (0) #include "debug.h" -volatile int native_interrupts_enabled; +volatile int native_interrupts_enabled = 0; volatile int _native_in_isr; volatile int _native_in_syscall; @@ -466,7 +466,6 @@ void native_interrupt_init(void) VALGRIND_DEBUG("VALGRIND_STACK_REGISTER(%p, %p)\n", (void *)__isr_stack, (void*)((int)__isr_stack + sizeof(__isr_stack))); - native_interrupts_enabled = 1; _native_sigpend = 0; for (int i = 0; i < 255; i++) { diff --git a/cpu/native/startup.c b/cpu/native/startup.c index 3e1dfbc28b..7851d4c5c4 100644 --- a/cpu/native/startup.c +++ b/cpu/native/startup.c @@ -32,6 +32,7 @@ #include "kernel_init.h" #include "cpu.h" +#include "irq.h" #include "board_internal.h" #include "native_internal.h" @@ -334,5 +335,6 @@ __attribute__((constructor)) static void startup(int argc, char **argv) board_init(); puts("RIOT native hardware initialization complete.\n"); + irq_enable(); kernel_init(); }