summaryrefslogtreecommitdiffstats
path: root/cpukit/score/inline
diff options
context:
space:
mode:
authorJoel Sherrill <joel.sherrill@OARcorp.com>2010-07-27 01:48:46 +0000
committerJoel Sherrill <joel.sherrill@OARcorp.com>2010-07-27 01:48:46 +0000
commit37d6e55b984c7fb9256bd701f516cccd1d84779b (patch)
tree76fe770c1ce35241796c00e7b66f34c24d2ae272 /cpukit/score/inline
parent2010-07-26 Joel Sherrill <joel.sherrill@oarcorp.com> (diff)
downloadrtems-37d6e55b984c7fb9256bd701f516cccd1d84779b.tar.bz2
2010-07-26 Joel Sherrill <joel.sherrilL@OARcorp.com>
* rtems/src/taskmode.c, score/inline/rtems/score/thread.inl: Rework a bit to eliminate unreachable path for task blocked while calling rtems_task_mode() on itself.
Diffstat (limited to 'cpukit/score/inline')
-rw-r--r--cpukit/score/inline/rtems/score/thread.inl11
1 files changed, 8 insertions, 3 deletions
diff --git a/cpukit/score/inline/rtems/score/thread.inl b/cpukit/score/inline/rtems/score/thread.inl
index 40735aff19..48721fe541 100644
--- a/cpukit/score/inline/rtems/score/thread.inl
+++ b/cpukit/score/inline/rtems/score/thread.inl
@@ -337,15 +337,20 @@ RTEMS_INLINE_ROUTINE void _Thread_Set_libc_reent (
* system and determines if a context switch is required. This
* is usually called after changing an execution mode such as preemptability
* for a thread.
+ *
+ * @param[in] are_signals_pending specifies whether or not the API
+ * level signals are pending and a dispatch is needed.
*/
-RTEMS_INLINE_ROUTINE bool _Thread_Evaluate_mode( void )
+RTEMS_INLINE_ROUTINE bool _Thread_Evaluate_is_dispatch_needed(
+ bool are_signals_pending
+)
{
Thread_Control *executing;
executing = _Thread_Executing;
- if ( !_States_Is_ready( executing->current_state ) ||
- ( !_Thread_Is_heir( executing ) && executing->is_preemptible ) ) {
+ if ( are_signals_pending ||
+ (!_Thread_Is_heir( executing ) && executing->is_preemptible) ) {
_Context_Switch_necessary = true;
return true;
}