change log for rtems (2010-07-26)

rtems-vc at rtems.org rtems-vc at rtems.org
Tue Jul 27 02:10:43 UTC 2010


 *joel*:
2010-07-26	Joel Sherrill <joel.sherrilL at 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.

M 1.2526  cpukit/ChangeLog
M   1.13  cpukit/rtems/src/taskmode.c
M   1.41  cpukit/score/inline/rtems/score/thread.inl

diff -u rtems/cpukit/ChangeLog:1.2525 rtems/cpukit/ChangeLog:1.2526
--- rtems/cpukit/ChangeLog:1.2525	Mon Jul 26 17:20:43 2010
+++ rtems/cpukit/ChangeLog	Mon Jul 26 20:48:46 2010
@@ -1,3 +1,9 @@
+2010-07-26	Joel Sherrill <joel.sherrilL at 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.
+
 2010-07-26	Joel Sherrill <joel.sherrill at oarcorp.com>
 
 	* sapi/include/confdefs.h: Spelling.

diff -u rtems/cpukit/rtems/src/taskmode.c:1.12 rtems/cpukit/rtems/src/taskmode.c:1.13
--- rtems/cpukit/rtems/src/taskmode.c:1.12	Mon Jun 28 19:34:11 2010
+++ rtems/cpukit/rtems/src/taskmode.c	Mon Jul 26 20:48:46 2010
@@ -1,8 +1,7 @@
 /*
- *  RTEMS Task Manager
+ *  RTEMS Task Manager - Change Task Mode
  *
- *
- *  COPYRIGHT (c) 1989-1999.
+ *  COPYRIGHT (c) 1989-2010.
  *  On-Line Applications Research Corporation (OAR).
  *
  *  The license and distribution terms for this file may be
@@ -32,8 +31,7 @@
 #include <rtems/score/apiext.h>
 #include <rtems/score/sysstate.h>
 
-/*PAGE
- *
+/*
  *  rtems_task_mode
  *
  *  This directive enables and disables several modes of
@@ -84,7 +82,6 @@
   /*
    *  These are generic thread scheduling characteristics.
    */
-
   if ( mask & RTEMS_PREEMPT_MASK )
     executing->is_preemptible = _Modes_Is_preempt(mode_set) ? true : false;
 
@@ -99,14 +96,12 @@
   /*
    *  Set the new interrupt level
    */
-
   if ( mask & RTEMS_INTERRUPT_MASK )
     _Modes_Set_interrupt_level( mode_set );
 
   /*
    *  This is specific to the RTEMS API
    */
-
   is_asr_enabled = false;
   needs_asr_dispatching = false;
 
@@ -121,9 +116,10 @@
     }
   }
 
-  if ( _System_state_Is_up( _System_state_Get() ) )
-    if ( _Thread_Evaluate_mode() || needs_asr_dispatching )
+  if ( _System_state_Is_up( _System_state_Get() ) ) {
+     if (_Thread_Evaluate_is_dispatch_needed( needs_asr_dispatching ) )
       _Thread_Dispatch();
+  }
 
   return RTEMS_SUCCESSFUL;
 }

diff -u rtems/cpukit/score/inline/rtems/score/thread.inl:1.40 rtems/cpukit/score/inline/rtems/score/thread.inl:1.41
--- rtems/cpukit/score/inline/rtems/score/thread.inl:1.40	Thu Jun 24 17:40:32 2010
+++ rtems/cpukit/score/inline/rtems/score/thread.inl	Mon Jul 26 20:48:46 2010
@@ -337,15 +337,20 @@
  *  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;
   }



--

Generated by Deluxe Loginfo [http://www.codewiz.org/projects/index.html#loginfo] 2.122 by Bernardo Innocenti <bernie at develer.com>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.rtems.org/pipermail/vc/attachments/20100726/6f92ccc7/attachment.html>


More information about the vc mailing list