From a55e85f8d0f340e56c2ef8ce5d163f0e06cb0490 Mon Sep 17 00:00:00 2001 From: Ludwig Ortmann Date: Wed, 29 Jan 2014 10:55:57 +0100 Subject: [PATCH] guard swapcontext in _native_syscall_leave --- cpu/native/syscalls.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/cpu/native/syscalls.c b/cpu/native/syscalls.c index 3adcc49e5e..d94365b7fa 100644 --- a/cpu/native/syscalls.c +++ b/cpu/native/syscalls.c @@ -32,6 +32,7 @@ #include #include "cpu.h" +#include "irq.h" #include "native_internal.h" @@ -72,6 +73,7 @@ void _native_syscall_leave() ) { _native_in_isr = 1; + dINT(); _native_cur_ctx = (ucontext_t *)active_thread->sp; native_isr_context.uc_stack.ss_sp = __isr_stack; native_isr_context.uc_stack.ss_size = SIGSTKSZ; @@ -80,6 +82,7 @@ void _native_syscall_leave() if (swapcontext(_native_cur_ctx, &native_isr_context) == -1) { err(EXIT_FAILURE, "_native_syscall_leave: swapcontext"); } + eINT(); } }