diff options
author | Sebastian Huber <sebastian.huber@embedded-brains.de> | 2012-11-22 13:03:09 +0100 |
---|---|---|
committer | Sebastian Huber <sebastian.huber@embedded-brains.de> | 2012-11-22 16:35:07 +0100 |
commit | 74d22fd1a9633efe12a7a9c6b7662d80c0185f87 (patch) | |
tree | 02fe5af136e868f84a71e5b0938a05fd167d90bd /cpukit/score/include | |
parent | score: Inline _User_extensions_Thread_switch() (diff) | |
download | rtems-74d22fd1a9633efe12a7a9c6b7662d80c0185f87.tar.bz2 |
score: Inline _API_extensions_Run_postswitch()
The _API_extensions_Run_postswitch() function is only used in
_Thread_Dispatch(). Avoid superfluous load of _Thread_Executing.
Diffstat (limited to 'cpukit/score/include')
-rw-r--r-- | cpukit/score/include/rtems/score/apiext.h | 16 |
1 files changed, 15 insertions, 1 deletions
diff --git a/cpukit/score/include/rtems/score/apiext.h b/cpukit/score/include/rtems/score/apiext.h index 514e4bab95..afd828ca38 100644 --- a/cpukit/score/include/rtems/score/apiext.h +++ b/cpukit/score/include/rtems/score/apiext.h @@ -130,7 +130,21 @@ void _API_extensions_Run_postdriver( void ); * * This routine executes all of the post context switch callouts. */ -void _API_extensions_Run_postswitch( void ); +static inline void _API_extensions_Run_postswitch( Thread_Control *executing ) +{ + const Chain_Control *chain = &_API_extensions_List; + const Chain_Node *tail = _Chain_Immutable_tail( chain ); + const Chain_Node *node = _Chain_Immutable_first( chain ); + + while ( node != tail ) { + const API_extensions_Control *extension = + (const API_extensions_Control *) node; + + (*extension->postswitch_hook)( executing ); + + node = _Chain_Immutable_next( node ); + } +} /**@}*/ |