mirror of
https://github.com/RIOT-OS/RIOT.git
synced 2025-12-27 07:21:18 +01:00
guard swapcontext in _native_syscall_leave
This commit is contained in:
parent
7f1db86ae2
commit
a55e85f8d0
@ -32,6 +32,7 @@
|
||||
#include <stdarg.h>
|
||||
|
||||
#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();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user