mirror of
https://gitlab.rtems.org/rtems/rtos/rtems.git
synced 2025-12-21 04:14:26 +08:00
Added code so post context switch extensions can be run on every context
switch. This was needed to support process wide signals.
This commit is contained in:
@@ -225,6 +225,13 @@ SCORE_EXTERN Context_Control _Thread_BSP_context;
|
||||
|
||||
SCORE_EXTERN unsigned32 _Thread_Dispatch_disable_level;
|
||||
|
||||
/*
|
||||
* If this is non-zero, then the post-task switch extension
|
||||
* is run regardless of the state of the per thread flag.
|
||||
*/
|
||||
|
||||
SCORE_EXTERN unsigned32 _Thread_Do_post_task_switch_extension;
|
||||
|
||||
/*
|
||||
* The following holds how many user extensions are in the system. This
|
||||
* is used to determine how many user extension data areas to allocate
|
||||
|
||||
@@ -225,6 +225,13 @@ SCORE_EXTERN Context_Control _Thread_BSP_context;
|
||||
|
||||
SCORE_EXTERN unsigned32 _Thread_Dispatch_disable_level;
|
||||
|
||||
/*
|
||||
* If this is non-zero, then the post-task switch extension
|
||||
* is run regardless of the state of the per thread flag.
|
||||
*/
|
||||
|
||||
SCORE_EXTERN unsigned32 _Thread_Do_post_task_switch_extension;
|
||||
|
||||
/*
|
||||
* The following holds how many user extensions are in the system. This
|
||||
* is used to determine how many user extension data areas to allocate
|
||||
|
||||
@@ -68,9 +68,11 @@ void _Thread_Handler_initialization(
|
||||
_Thread_Heir = NULL;
|
||||
_Thread_Allocated_fp = NULL;
|
||||
|
||||
_Thread_Do_post_task_switch_extension = 0;
|
||||
|
||||
_Thread_Maximum_extensions = maximum_extensions;
|
||||
|
||||
_Thread_Ticks_per_timeslice = ticks_per_timeslice;
|
||||
_Thread_Ticks_per_timeslice = ticks_per_timeslice;
|
||||
|
||||
_Thread_Ready_chain = _Workspace_Allocate_or_fatal_error(
|
||||
(PRIORITY_MAXIMUM + 1) * sizeof(Chain_Control)
|
||||
@@ -288,7 +290,8 @@ void _Thread_Dispatch( void )
|
||||
|
||||
_ISR_Enable( level );
|
||||
|
||||
if ( executing->do_post_task_switch_extension ) {
|
||||
if ( _Thread_Do_post_task_switch_extension ||
|
||||
executing->do_post_task_switch_extension ) {
|
||||
executing->do_post_task_switch_extension = FALSE;
|
||||
_API_extensions_Run_postswitch();
|
||||
}
|
||||
|
||||
@@ -225,6 +225,13 @@ SCORE_EXTERN Context_Control _Thread_BSP_context;
|
||||
|
||||
SCORE_EXTERN unsigned32 _Thread_Dispatch_disable_level;
|
||||
|
||||
/*
|
||||
* If this is non-zero, then the post-task switch extension
|
||||
* is run regardless of the state of the per thread flag.
|
||||
*/
|
||||
|
||||
SCORE_EXTERN unsigned32 _Thread_Do_post_task_switch_extension;
|
||||
|
||||
/*
|
||||
* The following holds how many user extensions are in the system. This
|
||||
* is used to determine how many user extension data areas to allocate
|
||||
|
||||
@@ -68,9 +68,11 @@ void _Thread_Handler_initialization(
|
||||
_Thread_Heir = NULL;
|
||||
_Thread_Allocated_fp = NULL;
|
||||
|
||||
_Thread_Do_post_task_switch_extension = 0;
|
||||
|
||||
_Thread_Maximum_extensions = maximum_extensions;
|
||||
|
||||
_Thread_Ticks_per_timeslice = ticks_per_timeslice;
|
||||
_Thread_Ticks_per_timeslice = ticks_per_timeslice;
|
||||
|
||||
_Thread_Ready_chain = _Workspace_Allocate_or_fatal_error(
|
||||
(PRIORITY_MAXIMUM + 1) * sizeof(Chain_Control)
|
||||
@@ -288,7 +290,8 @@ void _Thread_Dispatch( void )
|
||||
|
||||
_ISR_Enable( level );
|
||||
|
||||
if ( executing->do_post_task_switch_extension ) {
|
||||
if ( _Thread_Do_post_task_switch_extension ||
|
||||
executing->do_post_task_switch_extension ) {
|
||||
executing->do_post_task_switch_extension = FALSE;
|
||||
_API_extensions_Run_postswitch();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user