unified: Preemption check to include sched lock

Change-Id: I8dc635bc53036938b249220d655dceb1f6f413f0
Signed-off-by: Peter Mitsis <peter.mitsis@windriver.com>
This commit is contained in:
Peter Mitsis 2016-09-14 11:06:31 -04:00 committed by Benjamin Walsh
commit 685254f524

View file

@ -80,7 +80,7 @@ static inline int _is_coop(struct tcs *thread)
/* is thread currently preemptible ? */ /* is thread currently preemptible ? */
static inline int _is_preempt(struct tcs *thread) static inline int _is_preempt(struct tcs *thread)
{ {
return !_is_coop(thread); return !_is_coop(thread) && !atomic_get(&thread->sched_locked);
} }
/* is current thread preemptible and we are not running in ISR context */ /* is current thread preemptible and we are not running in ISR context */