From 9d3c2ea8a3b385401bc272b18110620e03da8ba2 Mon Sep 17 00:00:00 2001 From: arighi Date: Wed, 17 Mar 2010 14:12:58 +0000 Subject: [PATCH] preempt: be sure to never call proc_switch() or proc_yield() with IRQs disabled. git-svn-id: https://src.develer.com/svnoss/bertos/trunk@3228 38d2e660-2303-0410-9eaa-f027e97ec537 --- bertos/kern/preempt.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/bertos/kern/preempt.c b/bertos/kern/preempt.c index 19c43d3c..3037c15c 100644 --- a/bertos/kern/preempt.c +++ b/bertos/kern/preempt.c @@ -203,6 +203,7 @@ void proc_preempt(void) void proc_switch(void) { ASSERT(proc_preemptAllowed()); + IRQ_ASSERT_ENABLED(); ATOMIC(proc_schedule()); } @@ -219,6 +220,7 @@ void proc_yield(void) * ASSERT if it happens. */ ASSERT(proc_preemptAllowed()); + IRQ_ASSERT_ENABLED(); ATOMIC( SCHED_ENQUEUE(current_process); -- 2.25.1