diff options
-rw-r--r-- | c/src/exec/score/headers/thread.h | 7 | ||||
-rw-r--r-- | c/src/exec/score/include/rtems/score/thread.h | 7 | ||||
-rw-r--r-- | c/src/exec/score/src/thread.c | 7 | ||||
-rw-r--r-- | cpukit/score/include/rtems/score/thread.h | 7 | ||||
-rw-r--r-- | cpukit/score/src/thread.c | 7 |
5 files changed, 31 insertions, 4 deletions
diff --git a/c/src/exec/score/headers/thread.h b/c/src/exec/score/headers/thread.h index 97f6825e38..c0c59a5f74 100644 --- a/c/src/exec/score/headers/thread.h +++ b/c/src/exec/score/headers/thread.h @@ -226,6 +226,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 * per thread. diff --git a/c/src/exec/score/include/rtems/score/thread.h b/c/src/exec/score/include/rtems/score/thread.h index 97f6825e38..c0c59a5f74 100644 --- a/c/src/exec/score/include/rtems/score/thread.h +++ b/c/src/exec/score/include/rtems/score/thread.h @@ -226,6 +226,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 * per thread. diff --git a/c/src/exec/score/src/thread.c b/c/src/exec/score/src/thread.c index 5ca29b27b9..679c168e39 100644 --- a/c/src/exec/score/src/thread.c +++ b/c/src/exec/score/src/thread.c @@ -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(); } diff --git a/cpukit/score/include/rtems/score/thread.h b/cpukit/score/include/rtems/score/thread.h index 97f6825e38..c0c59a5f74 100644 --- a/cpukit/score/include/rtems/score/thread.h +++ b/cpukit/score/include/rtems/score/thread.h @@ -226,6 +226,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 * per thread. diff --git a/cpukit/score/src/thread.c b/cpukit/score/src/thread.c index 5ca29b27b9..679c168e39 100644 --- a/cpukit/score/src/thread.c +++ b/cpukit/score/src/thread.c @@ -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(); } |