diff options
author | Joel Sherrill <joel.sherrill@OARcorp.com> | 2009-08-19 16:40:03 +0000 |
---|---|---|
committer | Joel Sherrill <joel.sherrill@OARcorp.com> | 2009-08-19 16:40:03 +0000 |
commit | 93f7ea15e5df69c8a453d725126cde863898204a (patch) | |
tree | 8c182b877e419d46ea308d2ab55b7124df209128 | |
parent | 2009-08-19 Joel Sherrill <joel.sherrill@OARcorp.com> (diff) | |
download | rtems-93f7ea15e5df69c8a453d725126cde863898204a.tar.bz2 |
2009-08-19 Joel Sherrill <joel.sherrill@OARcorp.com>
* sapi/include/confdefs.h, score/Makefile.am,
score/include/rtems/score/thread.h: Only instantiate
_Thread_Idle_body() if it is going ot be used.
* score/src/threadidlebody.c: Removed.
-rw-r--r-- | cpukit/ChangeLog | 7 | ||||
-rw-r--r-- | cpukit/sapi/include/confdefs.h | 8 | ||||
-rw-r--r-- | cpukit/score/Makefile.am | 17 | ||||
-rw-r--r-- | cpukit/score/include/rtems/score/thread.h | 2 | ||||
-rw-r--r-- | cpukit/score/src/threadidlebody.c | 55 |
5 files changed, 25 insertions, 64 deletions
diff --git a/cpukit/ChangeLog b/cpukit/ChangeLog index f91808f9e8..3162f1848a 100644 --- a/cpukit/ChangeLog +++ b/cpukit/ChangeLog @@ -1,5 +1,12 @@ 2009-08-19 Joel Sherrill <joel.sherrill@OARcorp.com> + * sapi/include/confdefs.h, score/Makefile.am, + score/include/rtems/score/thread.h: Only instantiate + _Thread_Idle_body() if it is going ot be used. + * score/src/threadidlebody.c: Removed. + +2009-08-19 Joel Sherrill <joel.sherrill@OARcorp.com> + * posix/src/pthread.c: Address sporadic server edge cases. Do not change priority if thread is holding a priority ceiling or inheritance mutex. Do not change it if it looks like the thread has diff --git a/cpukit/sapi/include/confdefs.h b/cpukit/sapi/include/confdefs.h index 6a3df813c8..9d1bee2674 100644 --- a/cpukit/sapi/include/confdefs.h +++ b/cpukit/sapi/include/confdefs.h @@ -323,6 +323,14 @@ rtems_fs_init_functions_t rtems_fs_init_helper = #elif (CPU_PROVIDES_IDLE_THREAD_BODY == TRUE) #define CONFIGURE_IDLE_TASK_BODY _CPU_Thread_Idle_body #else + /* only instantiate and compile if used */ + #ifdef CONFIGURE_INIT + void *_Thread_Idle_body(uintptr_t ignored) + { + for( ; ; ) ; + return 0; /* to avoid warning */ + } + #endif #define CONFIGURE_IDLE_TASK_BODY _Thread_Idle_body #endif #endif diff --git a/cpukit/score/Makefile.am b/cpukit/score/Makefile.am index de06241bd0..d2afe4686f 100644 --- a/cpukit/score/Makefile.am +++ b/cpukit/score/Makefile.am @@ -148,15 +148,14 @@ libscore_a_SOURCES += src/pheapallocatealigned.c src/pheapallocate.c \ libscore_a_SOURCES += src/thread.c src/threadchangepriority.c \ src/threadclearstate.c src/threadclose.c src/threadcreateidle.c \ src/threaddelayended.c src/threaddispatch.c src/threadevaluatemode.c \ - src/threadget.c src/threadhandler.c src/threadidlebody.c \ - src/threadinitialize.c src/threadloadenv.c src/threadready.c \ - src/threadresettimeslice.c src/threadreset.c src/threadrestart.c \ - src/threadresume.c src/threadsetpriority.c src/threadsetstate.c \ - src/threadsettransient.c src/threadstackallocate.c \ - src/threadstackfree.c src/threadstart.c src/threadstartmultitasking.c \ - src/threadsuspend.c src/threadtickletimeslice.c \ - src/threadyieldprocessor.c src/iterateoverthreads.c \ - src/threadblockingoperationcancel.c + src/threadget.c src/threadhandler.c src/threadinitialize.c \ + src/threadloadenv.c src/threadready.c src/threadresettimeslice.c \ + src/threadreset.c src/threadrestart.c src/threadresume.c \ + src/threadsetpriority.c src/threadsetstate.c src/threadsettransient.c \ + src/threadstackallocate.c src/threadstackfree.c src/threadstart.c \ + src/threadstartmultitasking.c src/threadsuspend.c \ + src/threadtickletimeslice.c src/threadyieldprocessor.c \ + src/iterateoverthreads.c src/threadblockingoperationcancel.c ## THREAD_C_FILES only used by ITRON API if LIBITRON diff --git a/cpukit/score/include/rtems/score/thread.h b/cpukit/score/include/rtems/score/thread.h index 58c2e2e8ff..a8edc950d2 100644 --- a/cpukit/score/include/rtems/score/thread.h +++ b/cpukit/score/include/rtems/score/thread.h @@ -775,6 +775,8 @@ bool _Thread_Evaluate_mode( void ); #if (CPU_PROVIDES_IDLE_THREAD_BODY == FALSE) /** * This routine is the body of the system idle thread. + * + * NOTE: This routine is actually instantiated by confdefs.h when needed. */ void *_Thread_Idle_body( uintptr_t ignored diff --git a/cpukit/score/src/threadidlebody.c b/cpukit/score/src/threadidlebody.c deleted file mode 100644 index cea6c226b5..0000000000 --- a/cpukit/score/src/threadidlebody.c +++ /dev/null @@ -1,55 +0,0 @@ -/* - * Thread Handler - * - * - * COPYRIGHT (c) 1989-1999. - * On-Line Applications Research Corporation (OAR). - * - * The license and distribution terms for this file may be - * found in found in the file LICENSE in this distribution or at - * http://www.rtems.com/license/LICENSE. - * - * $Id$ - */ - -#if HAVE_CONFIG_H -#include "config.h" -#endif - -#include <rtems/system.h> -#include <rtems/score/apiext.h> -#include <rtems/score/context.h> -#include <rtems/score/interr.h> -#include <rtems/score/isr.h> -#include <rtems/score/object.h> -#include <rtems/score/priority.h> -#include <rtems/score/states.h> -#include <rtems/score/sysstate.h> -#include <rtems/score/thread.h> -#include <rtems/score/threadq.h> -#include <rtems/score/userext.h> -#include <rtems/score/wkspace.h> - -/*PAGE - * - * _Thread_Idle_body - * - * This kernel routine is the idle thread. The idle thread runs any time - * no other thread is ready to run. This thread loops forever with - * interrupts enabled. - * - * Input parameters: - * ignored - this parameter is ignored - * - * Output parameters: NONE - */ - -#if (CPU_PROVIDES_IDLE_THREAD_BODY == FALSE) -void *_Thread_Idle_body( - uintptr_t ignored -) -{ - for( ; ; ) ; - return 0; /* to avoid warning */ -} -#endif |