Changeset 94b3ec59 in rtems
- Timestamp:
- 02/13/96 22:14:48 (28 years ago)
- Branches:
- 4.10, 4.11, 4.8, 4.9, 5, master
- Children:
- da646dd
- Parents:
- 6ca1184
- Files:
-
- 26 edited
Legend:
- Unmodified
- Added
- Removed
-
c/src/exec/rtems/src/signal.c
r6ca1184 r94b3ec59 131 131 if ( asr->is_enabled ) { 132 132 _ASR_Post_signals( signal_set, &asr->signals_posted ); 133 134 the_thread->do_post_task_switch_extension = TRUE; 135 133 136 if ( _ISR_Is_in_progress() && _Thread_Is_executing( the_thread ) ) 134 137 _ISR_Signals_to_thread_executing = TRUE; -
c/src/exec/rtems/src/tasks.c
r6ca1184 r94b3ec59 101 101 */ 102 102 103 User_extensions_routine_RTEMS_tasks_Switch_extension(103 void _RTEMS_tasks_Switch_extension( 104 104 Thread_Control *executing 105 105 ) … … 136 136 { NULL, NULL }, 137 137 NULL, /* predriver */ 138 _RTEMS_tasks_Initialize_user_tasks /* postdriver */ 138 _RTEMS_tasks_Initialize_user_tasks, /* postdriver */ 139 _RTEMS_tasks_Switch_extension /* post switch */ 139 140 }; 140 141 … … 146 147 _RTEMS_tasks_Delete_extension, /* delete */ 147 148 NULL, /* switch */ 148 _RTEMS_tasks_Switch_extension, /* post switch */149 149 NULL, /* begin */ 150 150 NULL, /* exitted */ … … 807 807 asr->is_enabled = is_asr_enabled; 808 808 _ASR_Swap_signals( asr ); 809 if ( _ASR_Are_signals_pending( asr ) ) 809 if ( _ASR_Are_signals_pending( asr ) ) { 810 810 needs_asr_dispatching = TRUE; 811 executing->do_post_task_switch_extension = TRUE; 812 } 811 813 } 812 814 } -
c/src/exec/sapi/headers/extension.h
r6ca1184 r94b3ec59 44 44 typedef User_extensions_thread_restart_extension rtems_task_restart_extension; 45 45 typedef User_extensions_thread_switch_extension rtems_task_switch_extension; 46 typedef User_extensions_thread_post_switch_extension47 rtems_task_post_switch_extension;48 46 typedef User_extensions_thread_begin_extension rtems_task_begin_extension; 49 47 typedef User_extensions_thread_exitted_extension rtems_task_exitted_extension; -
c/src/exec/sapi/include/rtems/extension.h
r6ca1184 r94b3ec59 44 44 typedef User_extensions_thread_restart_extension rtems_task_restart_extension; 45 45 typedef User_extensions_thread_switch_extension rtems_task_switch_extension; 46 typedef User_extensions_thread_post_switch_extension47 rtems_task_post_switch_extension;48 46 typedef User_extensions_thread_begin_extension rtems_task_begin_extension; 49 47 typedef User_extensions_thread_exitted_extension rtems_task_exitted_extension; -
c/src/exec/score/headers/apiext.h
r6ca1184 r94b3ec59 19 19 20 20 #include <rtems/score/chain.h> 21 #include <rtems/score/thread.h> 21 22 22 23 /* … … 27 28 typedef void (*API_extensions_Predriver_hook)(void); 28 29 typedef void (*API_extensions_Postdriver_hook)(void); 30 typedef void (*API_extensions_Postswitch_hook)( 31 Thread_Control * 32 ); 33 29 34 30 35 typedef struct { 31 Chain_Node Node; 32 API_extensions_Predriver_hook predriver_hook; 33 API_extensions_Postdriver_hook postdriver_hook; 36 Chain_Node Node; 37 API_extensions_Predriver_hook predriver_hook; 38 API_extensions_Postdriver_hook postdriver_hook; 39 API_extensions_Postswitch_hook postswitch_hook; 34 40 } API_extensions_Control; 35 41 … … 83 89 void _API_extensions_Run_postdriver( void ); 84 90 91 /* 92 * _API_extensions_Run_postswitch 93 * 94 * DESCRIPTION: 95 * 96 * XXX 97 */ 98 99 void _API_extensions_Run_postswitch( void ); 100 85 101 #endif 86 102 /* end of include file */ -
c/src/exec/score/headers/thread.h
r6ca1184 r94b3ec59 149 149 /****************** end of common block ********************/ 150 150 boolean is_global; 151 boolean do_post_task_switch_extension; 151 152 Chain_Control *ready; 152 153 Priority_Information Priority_map; -
c/src/exec/score/headers/userext.h
r6ca1184 r94b3ec59 58 58 typedef User_extensions_routine ( *User_extensions_thread_switch_extension )( 59 59 Thread_Control *, 60 Thread_Control *61 );62 63 typedef User_extensions_routine (*User_extensions_thread_post_switch_extension)(64 60 Thread_Control * 65 61 ); … … 86 82 User_extensions_thread_delete_extension thread_delete; 87 83 User_extensions_thread_switch_extension thread_switch; 88 User_extensions_thread_post_switch_extension thread_post_switch;89 84 User_extensions_thread_begin_extension thread_begin; 90 85 User_extensions_thread_exitted_extension thread_exitted; … … 231 226 232 227 /* 233 * _User_extensions_Thread_post_switch234 *235 * DESCRIPTION:236 *237 * This routine is used to invoke the user extension which is invoked238 * after a context switch occurs (i.e. we are running in the context239 * of the new thread).240 */241 242 STATIC INLINE void _User_extensions_Thread_post_switch (243 Thread_Control *executing244 );245 246 247 /*248 228 * _User_extensions_Thread_begin 249 229 * -
c/src/exec/score/include/rtems/score/apiext.h
r6ca1184 r94b3ec59 19 19 20 20 #include <rtems/score/chain.h> 21 #include <rtems/score/thread.h> 21 22 22 23 /* … … 27 28 typedef void (*API_extensions_Predriver_hook)(void); 28 29 typedef void (*API_extensions_Postdriver_hook)(void); 30 typedef void (*API_extensions_Postswitch_hook)( 31 Thread_Control * 32 ); 33 29 34 30 35 typedef struct { 31 Chain_Node Node; 32 API_extensions_Predriver_hook predriver_hook; 33 API_extensions_Postdriver_hook postdriver_hook; 36 Chain_Node Node; 37 API_extensions_Predriver_hook predriver_hook; 38 API_extensions_Postdriver_hook postdriver_hook; 39 API_extensions_Postswitch_hook postswitch_hook; 34 40 } API_extensions_Control; 35 41 … … 83 89 void _API_extensions_Run_postdriver( void ); 84 90 91 /* 92 * _API_extensions_Run_postswitch 93 * 94 * DESCRIPTION: 95 * 96 * XXX 97 */ 98 99 void _API_extensions_Run_postswitch( void ); 100 85 101 #endif 86 102 /* end of include file */ -
c/src/exec/score/include/rtems/score/thread.h
r6ca1184 r94b3ec59 149 149 /****************** end of common block ********************/ 150 150 boolean is_global; 151 boolean do_post_task_switch_extension; 151 152 Chain_Control *ready; 152 153 Priority_Information Priority_map; -
c/src/exec/score/include/rtems/score/userext.h
r6ca1184 r94b3ec59 58 58 typedef User_extensions_routine ( *User_extensions_thread_switch_extension )( 59 59 Thread_Control *, 60 Thread_Control *61 );62 63 typedef User_extensions_routine (*User_extensions_thread_post_switch_extension)(64 60 Thread_Control * 65 61 ); … … 86 82 User_extensions_thread_delete_extension thread_delete; 87 83 User_extensions_thread_switch_extension thread_switch; 88 User_extensions_thread_post_switch_extension thread_post_switch;89 84 User_extensions_thread_begin_extension thread_begin; 90 85 User_extensions_thread_exitted_extension thread_exitted; … … 231 226 232 227 /* 233 * _User_extensions_Thread_post_switch234 *235 * DESCRIPTION:236 *237 * This routine is used to invoke the user extension which is invoked238 * after a context switch occurs (i.e. we are running in the context239 * of the new thread).240 */241 242 STATIC INLINE void _User_extensions_Thread_post_switch (243 Thread_Control *executing244 );245 246 247 /*248 228 * _User_extensions_Thread_begin 249 229 * -
c/src/exec/score/inline/rtems/score/userext.inl
r6ca1184 r94b3ec59 100 100 } 101 101 102 /*PAGE103 *104 * _User_extensions_Thread_post_switch105 *106 */107 108 STATIC INLINE void _User_extensions_Thread_post_switch (109 Thread_Control *executing110 )111 {112 Chain_Node *the_node;113 User_extensions_Control *the_extension;114 115 for ( the_node = _User_extensions_List.first ;116 !_Chain_Is_tail( &_User_extensions_List, the_node ) ;117 the_node = the_node->next ) {118 119 the_extension = (User_extensions_Control *) the_node;120 121 if ( the_extension->Callouts.thread_post_switch != NULL )122 (*the_extension->Callouts.thread_post_switch)( executing );123 }124 }125 126 102 #endif 127 103 /* end of include file */ -
c/src/exec/score/inline/userext.inl
r6ca1184 r94b3ec59 100 100 } 101 101 102 /*PAGE103 *104 * _User_extensions_Thread_post_switch105 *106 */107 108 STATIC INLINE void _User_extensions_Thread_post_switch (109 Thread_Control *executing110 )111 {112 Chain_Node *the_node;113 User_extensions_Control *the_extension;114 115 for ( the_node = _User_extensions_List.first ;116 !_Chain_Is_tail( &_User_extensions_List, the_node ) ;117 the_node = the_node->next ) {118 119 the_extension = (User_extensions_Control *) the_node;120 121 if ( the_extension->Callouts.thread_post_switch != NULL )122 (*the_extension->Callouts.thread_post_switch)( executing );123 }124 }125 126 102 #endif 127 103 /* end of include file */ -
c/src/exec/score/macros/rtems/score/userext.inl
r6ca1184 r94b3ec59 123 123 _User_extensions_Run_list_forward(thread_switch, (_executing, _heir) ) 124 124 125 /*PAGE126 *127 * _User_extensions_Thread_post_switch128 *129 */130 131 #define _User_extensions_Thread_post_switch( _executing ) \132 _User_extensions_Run_list_forward(thread_post_switch, (_executing) )133 134 125 #endif 135 126 /* end of include file */ -
c/src/exec/score/macros/userext.inl
r6ca1184 r94b3ec59 123 123 _User_extensions_Run_list_forward(thread_switch, (_executing, _heir) ) 124 124 125 /*PAGE126 *127 * _User_extensions_Thread_post_switch128 *129 */130 131 #define _User_extensions_Thread_post_switch( _executing ) \132 _User_extensions_Run_list_forward(thread_post_switch, (_executing) )133 134 125 #endif 135 126 /* end of include file */ -
c/src/exec/score/src/apiext.c
r6ca1184 r94b3ec59 82 82 } 83 83 84 /*PAGE 85 * 86 * _API_extensions_Run_postswitch 87 */ 88 89 void _API_extensions_Run_postswitch( void ) 90 { 91 Chain_Node *the_node; 92 API_extensions_Control *the_extension; 93 94 for ( the_node = _API_extensions_List.first ; 95 !_Chain_Is_tail( &_API_extensions_List, the_node ) ; 96 the_node = the_node->next ) { 97 98 the_extension = (API_extensions_Control *) the_node; 99 100 if ( the_extension->postswitch_hook ) 101 (*the_extension->postswitch_hook)( _Thread_Executing ); 102 } 103 } 104 84 105 /* end of file */ -
c/src/exec/score/src/thread.c
r6ca1184 r94b3ec59 15 15 16 16 #include <rtems/system.h> 17 #include <rtems/score/apiext.h> 17 18 #include <rtems/score/context.h> 18 19 #include <rtems/score/interr.h> … … 201 202 _ISR_Enable( level ); 202 203 203 _User_extensions_Thread_post_switch( executing ); 204 if ( executing->do_post_task_switch_extension ) { 205 executing->do_post_task_switch_extension = FALSE; 206 _API_extensions_Run_postswitch(); 207 } 204 208 205 209 } … … 814 818 } 815 819 820 the_thread->do_post_task_switch_extension = FALSE; 816 821 the_thread->is_preemptible = the_thread->Start.is_preemptible; 817 822 the_thread->is_timeslice = the_thread->Start.is_timeslice; -
cpukit/rtems/src/signal.c
r6ca1184 r94b3ec59 131 131 if ( asr->is_enabled ) { 132 132 _ASR_Post_signals( signal_set, &asr->signals_posted ); 133 134 the_thread->do_post_task_switch_extension = TRUE; 135 133 136 if ( _ISR_Is_in_progress() && _Thread_Is_executing( the_thread ) ) 134 137 _ISR_Signals_to_thread_executing = TRUE; -
cpukit/rtems/src/tasks.c
r6ca1184 r94b3ec59 101 101 */ 102 102 103 User_extensions_routine_RTEMS_tasks_Switch_extension(103 void _RTEMS_tasks_Switch_extension( 104 104 Thread_Control *executing 105 105 ) … … 136 136 { NULL, NULL }, 137 137 NULL, /* predriver */ 138 _RTEMS_tasks_Initialize_user_tasks /* postdriver */ 138 _RTEMS_tasks_Initialize_user_tasks, /* postdriver */ 139 _RTEMS_tasks_Switch_extension /* post switch */ 139 140 }; 140 141 … … 146 147 _RTEMS_tasks_Delete_extension, /* delete */ 147 148 NULL, /* switch */ 148 _RTEMS_tasks_Switch_extension, /* post switch */149 149 NULL, /* begin */ 150 150 NULL, /* exitted */ … … 807 807 asr->is_enabled = is_asr_enabled; 808 808 _ASR_Swap_signals( asr ); 809 if ( _ASR_Are_signals_pending( asr ) ) 809 if ( _ASR_Are_signals_pending( asr ) ) { 810 810 needs_asr_dispatching = TRUE; 811 executing->do_post_task_switch_extension = TRUE; 812 } 811 813 } 812 814 } -
cpukit/sapi/include/rtems/extension.h
r6ca1184 r94b3ec59 44 44 typedef User_extensions_thread_restart_extension rtems_task_restart_extension; 45 45 typedef User_extensions_thread_switch_extension rtems_task_switch_extension; 46 typedef User_extensions_thread_post_switch_extension47 rtems_task_post_switch_extension;48 46 typedef User_extensions_thread_begin_extension rtems_task_begin_extension; 49 47 typedef User_extensions_thread_exitted_extension rtems_task_exitted_extension; -
cpukit/score/include/rtems/score/apiext.h
r6ca1184 r94b3ec59 19 19 20 20 #include <rtems/score/chain.h> 21 #include <rtems/score/thread.h> 21 22 22 23 /* … … 27 28 typedef void (*API_extensions_Predriver_hook)(void); 28 29 typedef void (*API_extensions_Postdriver_hook)(void); 30 typedef void (*API_extensions_Postswitch_hook)( 31 Thread_Control * 32 ); 33 29 34 30 35 typedef struct { 31 Chain_Node Node; 32 API_extensions_Predriver_hook predriver_hook; 33 API_extensions_Postdriver_hook postdriver_hook; 36 Chain_Node Node; 37 API_extensions_Predriver_hook predriver_hook; 38 API_extensions_Postdriver_hook postdriver_hook; 39 API_extensions_Postswitch_hook postswitch_hook; 34 40 } API_extensions_Control; 35 41 … … 83 89 void _API_extensions_Run_postdriver( void ); 84 90 91 /* 92 * _API_extensions_Run_postswitch 93 * 94 * DESCRIPTION: 95 * 96 * XXX 97 */ 98 99 void _API_extensions_Run_postswitch( void ); 100 85 101 #endif 86 102 /* end of include file */ -
cpukit/score/include/rtems/score/thread.h
r6ca1184 r94b3ec59 149 149 /****************** end of common block ********************/ 150 150 boolean is_global; 151 boolean do_post_task_switch_extension; 151 152 Chain_Control *ready; 152 153 Priority_Information Priority_map; -
cpukit/score/include/rtems/score/userext.h
r6ca1184 r94b3ec59 58 58 typedef User_extensions_routine ( *User_extensions_thread_switch_extension )( 59 59 Thread_Control *, 60 Thread_Control *61 );62 63 typedef User_extensions_routine (*User_extensions_thread_post_switch_extension)(64 60 Thread_Control * 65 61 ); … … 86 82 User_extensions_thread_delete_extension thread_delete; 87 83 User_extensions_thread_switch_extension thread_switch; 88 User_extensions_thread_post_switch_extension thread_post_switch;89 84 User_extensions_thread_begin_extension thread_begin; 90 85 User_extensions_thread_exitted_extension thread_exitted; … … 231 226 232 227 /* 233 * _User_extensions_Thread_post_switch234 *235 * DESCRIPTION:236 *237 * This routine is used to invoke the user extension which is invoked238 * after a context switch occurs (i.e. we are running in the context239 * of the new thread).240 */241 242 STATIC INLINE void _User_extensions_Thread_post_switch (243 Thread_Control *executing244 );245 246 247 /*248 228 * _User_extensions_Thread_begin 249 229 * -
cpukit/score/inline/rtems/score/userext.inl
r6ca1184 r94b3ec59 100 100 } 101 101 102 /*PAGE103 *104 * _User_extensions_Thread_post_switch105 *106 */107 108 STATIC INLINE void _User_extensions_Thread_post_switch (109 Thread_Control *executing110 )111 {112 Chain_Node *the_node;113 User_extensions_Control *the_extension;114 115 for ( the_node = _User_extensions_List.first ;116 !_Chain_Is_tail( &_User_extensions_List, the_node ) ;117 the_node = the_node->next ) {118 119 the_extension = (User_extensions_Control *) the_node;120 121 if ( the_extension->Callouts.thread_post_switch != NULL )122 (*the_extension->Callouts.thread_post_switch)( executing );123 }124 }125 126 102 #endif 127 103 /* end of include file */ -
cpukit/score/macros/rtems/score/userext.inl
r6ca1184 r94b3ec59 123 123 _User_extensions_Run_list_forward(thread_switch, (_executing, _heir) ) 124 124 125 /*PAGE126 *127 * _User_extensions_Thread_post_switch128 *129 */130 131 #define _User_extensions_Thread_post_switch( _executing ) \132 _User_extensions_Run_list_forward(thread_post_switch, (_executing) )133 134 125 #endif 135 126 /* end of include file */ -
cpukit/score/src/apiext.c
r6ca1184 r94b3ec59 82 82 } 83 83 84 /*PAGE 85 * 86 * _API_extensions_Run_postswitch 87 */ 88 89 void _API_extensions_Run_postswitch( void ) 90 { 91 Chain_Node *the_node; 92 API_extensions_Control *the_extension; 93 94 for ( the_node = _API_extensions_List.first ; 95 !_Chain_Is_tail( &_API_extensions_List, the_node ) ; 96 the_node = the_node->next ) { 97 98 the_extension = (API_extensions_Control *) the_node; 99 100 if ( the_extension->postswitch_hook ) 101 (*the_extension->postswitch_hook)( _Thread_Executing ); 102 } 103 } 104 84 105 /* end of file */ -
cpukit/score/src/thread.c
r6ca1184 r94b3ec59 15 15 16 16 #include <rtems/system.h> 17 #include <rtems/score/apiext.h> 17 18 #include <rtems/score/context.h> 18 19 #include <rtems/score/interr.h> … … 201 202 _ISR_Enable( level ); 202 203 203 _User_extensions_Thread_post_switch( executing ); 204 if ( executing->do_post_task_switch_extension ) { 205 executing->do_post_task_switch_extension = FALSE; 206 _API_extensions_Run_postswitch(); 207 } 204 208 205 209 } … … 814 818 } 815 819 820 the_thread->do_post_task_switch_extension = FALSE; 816 821 the_thread->is_preemptible = the_thread->Start.is_preemptible; 817 822 the_thread->is_timeslice = the_thread->Start.is_timeslice;
Note: See TracChangeset
for help on using the changeset viewer.