summaryrefslogtreecommitdiffstats
path: root/cpukit/score/src/threaddispatch.c
diff options
context:
space:
mode:
authorJoel Sherrill <joel.sherrill@OARcorp.com>2007-11-27 20:51:18 +0000
committerJoel Sherrill <joel.sherrill@OARcorp.com>2007-11-27 20:51:18 +0000
commit5603b5a6e96e9e8f578e8a402654a0dd67ab0bbf (patch)
treee5b0984c94e02ca57c1d5d27247bf32d2a7c52df /cpukit/score/src/threaddispatch.c
parent2007-11-27 Joel Sherrill <joel.sherrill@OARcorp.com> (diff)
downloadrtems-5603b5a6e96e9e8f578e8a402654a0dd67ab0bbf.tar.bz2
2007-11-27 Joel Sherrill <joel.sherrill@OARcorp.com>
* configure.ac, score/inline/rtems/score/thread.inl, score/src/threaddispatch.c: Add ability for user to disable inlining of _Thread_Enable_dispatch. This can save code space but more importantly it means the binary generated does not have code inlined that is difficult to test and very seldom executed.
Diffstat (limited to 'cpukit/score/src/threaddispatch.c')
-rw-r--r--cpukit/score/src/threaddispatch.c34
1 files changed, 25 insertions, 9 deletions
diff --git a/cpukit/score/src/threaddispatch.c b/cpukit/score/src/threaddispatch.c
index 4c903b6c2a..cddfb757a6 100644
--- a/cpukit/score/src/threaddispatch.c
+++ b/cpukit/score/src/threaddispatch.c
@@ -31,20 +31,15 @@
#include <rtems/score/wkspace.h>
#ifdef RTEMS_ENABLE_NANOSECOND_CPU_USAGE_STATISTICS
-
#include <rtems/score/timespec.h>
#endif
/*PAGE
*
- * _Thread_Dispatch
+ * _Thread_Enable_dispatch
*
- * This kernel routine determines if a dispatch is needed, and if so
- * dispatches to the heir thread. Once the heir is running an attempt
- * is made to dispatch any ASRs.
- *
- * ALTERNATE ENTRY POINTS:
- * void _Thread_Enable_dispatch();
+ * This kernel routine exits a context switch disable critical section.
+ * This is the NOT INLINED version.
*
* Input parameters: NONE
*
@@ -55,7 +50,8 @@
* no dispatch thread
*/
-#if ( CPU_INLINE_ENABLE_DISPATCH == FALSE )
+#if ( (CPU_INLINE_ENABLE_DISPATCH == FALSE) || \
+ (__RTEMS_DO_NOT_INLINE_THREAD_ENABLE_DISPATCH__ == 1) )
void _Thread_Enable_dispatch( void )
{
if ( --_Thread_Dispatch_disable_level )
@@ -64,6 +60,26 @@ void _Thread_Enable_dispatch( void )
}
#endif
+/*PAGE
+ *
+ * _Thread_Dispatch
+ *
+ * This kernel routine determines if a dispatch is needed, and if so
+ * dispatches to the heir thread. Once the heir is running an attempt
+ * is made to dispatch any ASRs.
+ *
+ * ALTERNATE ENTRY POINTS:
+ * void _Thread_Enable_dispatch();
+ *
+ * Input parameters: NONE
+ *
+ * Output parameters: NONE
+ *
+ * INTERRUPT LATENCY:
+ * dispatch thread
+ * no dispatch thread
+ */
+
void _Thread_Dispatch( void )
{
Thread_Control *executing;