summaryrefslogtreecommitdiffstats
path: root/cpukit/score
diff options
context:
space:
mode:
Diffstat (limited to 'cpukit/score')
-rw-r--r--cpukit/score/include/rtems/score/coremuteximpl.h3
-rw-r--r--cpukit/score/include/rtems/score/mrspimpl.h2
-rw-r--r--cpukit/score/include/rtems/score/threadimpl.h3
-rw-r--r--cpukit/score/src/threadrestart.c6
-rw-r--r--cpukit/score/src/threadtimeout.c3
5 files changed, 8 insertions, 9 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 );
}
diff --git a/cpukit/score/src/threadrestart.c b/cpukit/score/src/threadrestart.c
index ac1427b090..54491d86f2 100644
--- a/cpukit/score/src/threadrestart.c
+++ b/cpukit/score/src/threadrestart.c
@@ -57,8 +57,9 @@ static void _Thread_Raise_real_priority(
{
Thread_queue_Context queue_context;
- _Thread_Wait_acquire( the_thread, &queue_context );
+ _Thread_queue_Context_initialize( &queue_context );
_Thread_queue_Context_clear_priority_updates( &queue_context );
+ _Thread_Wait_acquire( the_thread, &queue_context );
if ( priority < the_thread->Real_priority.priority ) {
_Thread_Priority_change(
@@ -637,6 +638,8 @@ void _Thread_Restart_self(
|| executing->current_state == STATES_SUSPENDED
);
+ _Thread_queue_Context_initialize( &queue_context );
+ _Thread_queue_Context_clear_priority_updates( &queue_context );
_Thread_State_acquire_critical( executing, lock_context );
executing->Start.Entry = *entry;
@@ -650,7 +653,6 @@ void _Thread_Restart_self(
cpu_self = _Thread_Dispatch_disable_critical( lock_context );
_Thread_State_release( executing, lock_context );
- _Thread_queue_Context_clear_priority_updates( &queue_context );
_Thread_Wait_acquire_default( executing, lock_context );
_Thread_Priority_change(
executing,
diff --git a/cpukit/score/src/threadtimeout.c b/cpukit/score/src/threadtimeout.c
index ea270553b2..8bcdc3806d 100644
--- a/cpukit/score/src/threadtimeout.c
+++ b/cpukit/score/src/threadtimeout.c
@@ -31,8 +31,9 @@ void _Thread_Timeout( Watchdog_Control *watchdog )
the_thread = RTEMS_CONTAINER_OF( watchdog, Thread_Control, Timer.Watchdog );
- _Thread_Wait_acquire( the_thread, &queue_context );
+ _Thread_queue_Context_initialize( &queue_context );
_Thread_queue_Context_clear_priority_updates( &queue_context );
+ _Thread_Wait_acquire( the_thread, &queue_context );
wait_flags = _Thread_Wait_flags_get( the_thread );