diff options
author | Sebastian Huber <sebastian.huber@embedded-brains.de> | 2012-11-22 15:00:21 +0100 |
---|---|---|
committer | Sebastian Huber <sebastian.huber@embedded-brains.de> | 2012-11-22 16:35:07 +0100 |
commit | 32b2c83d0025859c8839417d23a8c66fc32bc32a (patch) | |
tree | 552c7db125fd8ea64c5cd9f28909f4aebf37872b /cpukit/score/include/rtems/score/userextimpl.h | |
parent | score: Add and use <rtems/score/userextimpl.h> (diff) | |
download | rtems-32b2c83d0025859c8839417d23a8c66fc32bc32a.tar.bz2 |
score: Inline _User_extensions_Thread_switch()
The _User_extensions_Thread_switch() function is only used in
_Thread_Dispatch().
Diffstat (limited to '')
-rw-r--r-- | cpukit/score/include/rtems/score/userextimpl.h | 18 |
1 files changed, 16 insertions, 2 deletions
diff --git a/cpukit/score/include/rtems/score/userextimpl.h b/cpukit/score/include/rtems/score/userextimpl.h index 665278e24e..c7d35a8ac9 100644 --- a/cpukit/score/include/rtems/score/userextimpl.h +++ b/cpukit/score/include/rtems/score/userextimpl.h @@ -199,10 +199,24 @@ static inline void _User_extensions_Thread_begin( Thread_Control *executing ) ); } -void _User_extensions_Thread_switch( +static inline void _User_extensions_Thread_switch( Thread_Control *executing, Thread_Control *heir -); +) +{ + const Chain_Control *chain = &_User_extensions_Switches_list; + const Chain_Node *tail = _Chain_Immutable_tail( chain ); + const Chain_Node *node = _Chain_Immutable_first( chain ); + + while ( node != tail ) { + const User_extensions_Switch_control *extension = + (const User_extensions_Switch_control *) node; + + (*extension->thread_switch)( executing, heir ); + + node = _Chain_Immutable_next( node ); + } +} static inline void _User_extensions_Thread_exitted( Thread_Control *executing ) { |