From f926b34f663debae055330a9e54ee71fc1f65d12 Mon Sep 17 00:00:00 2001 From: Joel Sherrill Date: Sat, 8 Mar 1997 03:51:55 +0000 Subject: Modified calls to _Thread_Change_priority to take a third argument. The new argument indicates whether the task is to be placed at the head or tail of its priority fifo when it is lowering its own priority. POSIX normally follows the RTEMS API conventions but GNAT expects that all lowering of a task's priority by the task itself will result in being placed at the head of the priority FIFO. Normally, this would only occur as the result of lose of inherited priority. --- cpukit/score/src/coremutex.c | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) (limited to 'cpukit/score/src/coremutex.c') diff --git a/cpukit/score/src/coremutex.c b/cpukit/score/src/coremutex.c index f68d038e76..ffe3de6676 100644 --- a/cpukit/score/src/coremutex.c +++ b/cpukit/score/src/coremutex.c @@ -142,7 +142,8 @@ void _CORE_mutex_Seize( executing->current_priority ) { _Thread_Change_priority( the_mutex->holder, - the_mutex->Attributes.priority_ceiling + the_mutex->Attributes.priority_ceiling, + FALSE ); } } @@ -180,7 +181,8 @@ void _CORE_mutex_Seize( if ( the_mutex->holder->current_priority > executing->current_priority ) { _Thread_Change_priority( the_mutex->holder, - executing->current_priority + executing->current_priority, + FALSE ); } break; @@ -199,7 +201,8 @@ void _CORE_mutex_Seize( executing->current_priority ) { _Thread_Change_priority( executing, - the_mutex->Attributes.priority_ceiling + the_mutex->Attributes.priority_ceiling, + FALSE ); }; break; @@ -262,10 +265,9 @@ CORE_mutex_Status _CORE_mutex_Surrender( break; case CORE_MUTEX_DISCIPLINES_PRIORITY_CEILING: case CORE_MUTEX_DISCIPLINES_PRIORITY_INHERIT: - if ( executing->resource_count == 0 && - executing->real_priority != - executing->current_priority ) { - _Thread_Change_priority( executing, executing->real_priority ); + if ( executing->resource_count == 0 && + executing->real_priority != executing->current_priority ) { + _Thread_Change_priority( executing, executing->real_priority, TRUE ); } break; } -- cgit v1.2.3