From 237340b3e321eaf50cb2d90bdcce620803e8c87c Mon Sep 17 00:00:00 2001 From: Ludwig Ortmann Date: Fri, 28 Nov 2014 12:13:45 +0100 Subject: [PATCH] native: add thread_yield_higher misuse warning --- cpu/native/native_cpu.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/cpu/native/native_cpu.c b/cpu/native/native_cpu.c index 284cae862b..372b025c4d 100644 --- a/cpu/native/native_cpu.c +++ b/cpu/native/native_cpu.c @@ -185,6 +185,9 @@ void thread_yield_higher(void) if (_native_in_isr == 0) { ucontext_t *ctx = (ucontext_t *)(sched_active_thread->sp); _native_in_isr = 1; + if (!native_interrupts_enabled) { + warnx("thread_yield_higher: interrupts are disabled - this should not be"); + } irq_disable(); native_isr_context.uc_stack.ss_sp = __isr_stack; native_isr_context.uc_stack.ss_size = SIGSTKSZ;