diff options
author | Richard Braun <rbraun@sceen.net> | 2017-08-25 21:48:37 +0200 |
---|---|---|
committer | Richard Braun <rbraun@sceen.net> | 2017-08-25 21:48:37 +0200 |
commit | 094319b4a0a04ae11e24b44bb67aaf901536afb2 (patch) | |
tree | fb1d6291f003615edd97ca507dea8da5d279c191 | |
parent | 8119ef95c94aafdec81e4646b9425922107e73b7 (diff) |
kern/thread: don't trigger priority propagation on return from interrupt
-rw-r--r-- | kern/thread.h | 14 |
1 files changed, 11 insertions, 3 deletions
diff --git a/kern/thread.h b/kern/thread.h index f565c155..1c052364 100644 --- a/kern/thread.h +++ b/kern/thread.h @@ -573,15 +573,23 @@ thread_preempt_enable_no_resched(void) assert(thread->preempt != 0); thread->preempt--; - if (thread_preempt_enabled() && thread_priority_propagation_needed()) { - thread_propagate_priority(); - } + /* + * Don't perform priority propagation here, because this function is + * called on return from interrupt, where the transient state may + * incorrectly trigger it. + */ } static inline void thread_preempt_enable(void) { thread_preempt_enable_no_resched(); + + if (thread_priority_propagation_needed() + && thread_preempt_enabled()) { + thread_propagate_priority(); + } + thread_schedule(); } |