[rtems commit] threadhandler.c: Add comments

Joel Sherrill joel at rtems.org
Tue Jul 9 17:35:03 UTC 2013


Module:    rtems
Branch:    master
Commit:    155ea78d9f14ff235d147c6479b85dbe23a6875e
Changeset: http://git.rtems.org/rtems/commit/?id=155ea78d9f14ff235d147c6479b85dbe23a6875e

Author:    Joel Sherrill <joel.sherrill at oarcorp.com>
Date:      Tue Jul  9 11:15:34 2013 -0500

threadhandler.c: Add comments

---

 cpukit/score/src/threadhandler.c |   10 ++++++++++
 1 files changed, 10 insertions(+), 0 deletions(-)

diff --git a/cpukit/score/src/threadhandler.c b/cpukit/score/src/threadhandler.c
index f21722a..85f8f6e 100644
--- a/cpukit/score/src/threadhandler.c
+++ b/cpukit/score/src/threadhandler.c
@@ -96,6 +96,11 @@ void _Thread_Handler( void )
     #endif
   #endif
 
+  /*
+   * Initialize the floating point context because we do not come
+   * through _Thread_Dispatch on our first invocation. So the normal
+   * code path for performing the FP context switch is not hit.
+   */
   #if ( CPU_HARDWARE_FP == TRUE ) || ( CPU_SOFTWARE_FP == TRUE )
     #if ( CPU_USE_DEFERRED_FP_SWITCH == TRUE )
       if ( (executing->fp_context != NULL) &&
@@ -130,6 +135,11 @@ void _Thread_Handler( void )
     }
  #endif
 
+  /*
+   *  RTEMS supports multiple APIs and each API can define a different
+   *  thread/task prototype. The following code supports invoking the
+   *  user thread entry point using the prototype expected.
+   */
   if ( executing->Start.prototype == THREAD_START_NUMERIC ) {
     executing->Wait.return_argument =
       (*(Thread_Entry_numeric) executing->Start.entry_point)(




More information about the vc mailing list