diff options
author | Sebastian Huber <sebastian.huber@embedded-brains.de> | 2016-12-01 20:42:48 +0100 |
---|---|---|
committer | Sebastian Huber <sebastian.huber@embedded-brains.de> | 2016-12-02 12:41:03 +0100 |
commit | 5b6c290ed0fae8f9afd343c891e6d3650ef22492 (patch) | |
tree | f01c2825980599091959ff403c98fb95ee5851d3 /cpukit/score/include/rtems | |
parent | posix: Fix typo (diff) | |
download | rtems-5b6c290ed0fae8f9afd343c891e6d3650ef22492.tar.bz2 |
score: Initialize thread queue context early
Initialize thread queue context early preferably outside the critical
section.
Remove implicit _Thread_queue_Context_initialize() from
_Thread_Wait_acquire().
Diffstat (limited to 'cpukit/score/include/rtems')
-rw-r--r-- | cpukit/score/include/rtems/score/coremuteximpl.h | 3 | ||||
-rw-r--r-- | cpukit/score/include/rtems/score/mrspimpl.h | 2 | ||||
-rw-r--r-- | cpukit/score/include/rtems/score/threadimpl.h | 3 |
3 files changed, 2 insertions, 6 deletions
diff --git a/cpukit/score/include/rtems/score/coremuteximpl.h b/cpukit/score/include/rtems/score/coremuteximpl.h index 638cf8801c..dead048880 100644 --- a/cpukit/score/include/rtems/score/coremuteximpl.h +++ b/cpukit/score/include/rtems/score/coremuteximpl.h @@ -253,7 +253,6 @@ RTEMS_INLINE_ROUTINE void _CORE_ceiling_mutex_Set_priority( if ( owner != NULL ) { _Thread_Wait_acquire( owner, queue_context ); - _Thread_queue_Context_clear_priority_updates( queue_context ); _Thread_Priority_change( owner, &the_mutex->Priority_ceiling, @@ -284,7 +283,6 @@ RTEMS_INLINE_ROUTINE Status_Control _CORE_ceiling_mutex_Set_owner( Scheduler_Node *scheduler_node; Per_CPU_Control *cpu_self; - _Thread_queue_Context_clear_priority_updates( queue_context ); _Thread_Wait_acquire_default_critical( owner, &lock_context ); scheduler_node = _Thread_Scheduler_get_home_node( owner ); @@ -341,6 +339,7 @@ RTEMS_INLINE_ROUTINE Status_Control _CORE_ceiling_mutex_Seize( } #endif + _Thread_queue_Context_clear_priority_updates( queue_context ); return _CORE_ceiling_mutex_Set_owner( the_mutex, executing, diff --git a/cpukit/score/include/rtems/score/mrspimpl.h b/cpukit/score/include/rtems/score/mrspimpl.h index 1339b50aa9..9773d4a01e 100644 --- a/cpukit/score/include/rtems/score/mrspimpl.h +++ b/cpukit/score/include/rtems/score/mrspimpl.h @@ -132,7 +132,7 @@ RTEMS_INLINE_ROUTINE void _MRSP_Remove_priority( Thread_queue_Context *queue_context ) { - ISR_lock_Context lock_context; + ISR_lock_Context lock_context; _Thread_queue_Context_clear_priority_updates( queue_context ); _Thread_Wait_acquire_default_critical( thread, &lock_context ); diff --git a/cpukit/score/include/rtems/score/threadimpl.h b/cpukit/score/include/rtems/score/threadimpl.h index a38b23c2b6..f131bbd506 100644 --- a/cpukit/score/include/rtems/score/threadimpl.h +++ b/cpukit/score/include/rtems/score/threadimpl.h @@ -1333,8 +1333,6 @@ RTEMS_INLINE_ROUTINE void _Thread_Wait_release_queue_critical( * @param[in] the_thread The thread. * @param[in] queue_context The thread queue context for the corresponding * _Thread_Wait_release_critical(). - * - * @see _Thread_queue_Context_initialize(). */ RTEMS_INLINE_ROUTINE void _Thread_Wait_acquire_critical( Thread_Control *the_thread, @@ -1397,7 +1395,6 @@ RTEMS_INLINE_ROUTINE void _Thread_Wait_acquire( Thread_queue_Context *queue_context ) { - _Thread_queue_Context_initialize( queue_context ); _ISR_lock_ISR_disable( &queue_context->Lock_context.Lock_context ); _Thread_Wait_acquire_critical( the_thread, queue_context ); } |