forked from Imagelibrary/rtems
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.
This commit is contained in:
@@ -1,3 +1,11 @@
|
||||
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.
|
||||
|
||||
2007-11-27 Glenn Humphrey <glenn.humphrey@OARcorp.com>
|
||||
|
||||
* posix/src/prwlocktimedrdlock.c, posix/src/prwlocktimedwrlock.c,
|
||||
|
||||
@@ -224,6 +224,12 @@ RTEMS_CPUOPT([__RTEMS_USE_TICKS_RATE_MONOTONIC_STATISTICS__],
|
||||
[disable nanosecond granularity for period statistics]
|
||||
)
|
||||
|
||||
RTEMS_CPUOPT([__RTEMS_DO_NOT_INLINE_THREAD_ENABLE_DISPATCH__],
|
||||
[test x"${RTEMS_DO_NOT_INLINE_THREAD_ENABLE_DISPATCH}" = x"1"],
|
||||
[1],
|
||||
[disable inlining _Thread_Enable_dispatch]
|
||||
)
|
||||
|
||||
RTEMS_CPUOPT([__RTEMS_MAJOR__],
|
||||
[true],
|
||||
[$rtems_major],
|
||||
|
||||
@@ -189,7 +189,11 @@ RTEMS_INLINE_ROUTINE void _Thread_Disable_dispatch( void )
|
||||
* processor will be transferred to the heir thread.
|
||||
*/
|
||||
|
||||
#if ( CPU_INLINE_ENABLE_DISPATCH == TRUE )
|
||||
#if ( (CPU_INLINE_ENABLE_DISPATCH == FALSE) || \
|
||||
(__RTEMS_DO_NOT_INLINE_THREAD_ENABLE_DISPATCH__ == 1) )
|
||||
void _Thread_Enable_dispatch( void );
|
||||
#else
|
||||
/* inlining of enable dispatching must be true */
|
||||
RTEMS_INLINE_ROUTINE void _Thread_Enable_dispatch()
|
||||
{
|
||||
RTEMS_COMPILER_MEMORY_BARRIER();
|
||||
@@ -198,9 +202,6 @@ RTEMS_INLINE_ROUTINE void _Thread_Enable_dispatch()
|
||||
}
|
||||
#endif
|
||||
|
||||
#if ( CPU_INLINE_ENABLE_DISPATCH == FALSE )
|
||||
void _Thread_Enable_dispatch( void );
|
||||
#endif
|
||||
|
||||
/**
|
||||
* This routine allows dispatching to occur again. However,
|
||||
|
||||
@@ -31,10 +31,35 @@
|
||||
#include <rtems/score/wkspace.h>
|
||||
|
||||
#ifdef RTEMS_ENABLE_NANOSECOND_CPU_USAGE_STATISTICS
|
||||
|
||||
#include <rtems/score/timespec.h>
|
||||
#endif
|
||||
|
||||
/*PAGE
|
||||
*
|
||||
* _Thread_Enable_dispatch
|
||||
*
|
||||
* This kernel routine exits a context switch disable critical section.
|
||||
* This is the NOT INLINED version.
|
||||
*
|
||||
* Input parameters: NONE
|
||||
*
|
||||
* Output parameters: NONE
|
||||
*
|
||||
* INTERRUPT LATENCY:
|
||||
* dispatch thread
|
||||
* no dispatch thread
|
||||
*/
|
||||
|
||||
#if ( (CPU_INLINE_ENABLE_DISPATCH == FALSE) || \
|
||||
(__RTEMS_DO_NOT_INLINE_THREAD_ENABLE_DISPATCH__ == 1) )
|
||||
void _Thread_Enable_dispatch( void )
|
||||
{
|
||||
if ( --_Thread_Dispatch_disable_level )
|
||||
return;
|
||||
_Thread_Dispatch();
|
||||
}
|
||||
#endif
|
||||
|
||||
/*PAGE
|
||||
*
|
||||
* _Thread_Dispatch
|
||||
@@ -55,15 +80,6 @@
|
||||
* no dispatch thread
|
||||
*/
|
||||
|
||||
#if ( CPU_INLINE_ENABLE_DISPATCH == FALSE )
|
||||
void _Thread_Enable_dispatch( void )
|
||||
{
|
||||
if ( --_Thread_Dispatch_disable_level )
|
||||
return;
|
||||
_Thread_Dispatch();
|
||||
}
|
||||
#endif
|
||||
|
||||
void _Thread_Dispatch( void )
|
||||
{
|
||||
Thread_Control *executing;
|
||||
|
||||
Reference in New Issue
Block a user