From: arighi Date: Wed, 17 Mar 2010 14:12:58 +0000 (+0000) Subject: preempt: be sure to never call proc_switch() or proc_yield() with IRQs disabled. X-Git-Tag: 2.4.0~36 X-Git-Url: https://codewiz.org/gitweb?a=commitdiff_plain;ds=sidebyside;h=9d3c2ea8a3b385401bc272b18110620e03da8ba2;hp=7866d885e4eb4e5e0feead374294c8d734507fc7;p=bertos.git 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 --- 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);