summaryrefslogtreecommitdiffstats
path: root/cpukit/score/src/coremutex.c
diff options
context:
space:
mode:
authorJoel Sherrill <joel.sherrill@OARcorp.com>1997-03-08 03:51:55 +0000
committerJoel Sherrill <joel.sherrill@OARcorp.com>1997-03-08 03:51:55 +0000
commitf926b34f663debae055330a9e54ee71fc1f65d12 (patch)
treed9d8885ae63c794d29645234955ba094f77617b0 /cpukit/score/src/coremutex.c
parentModified calls to _Thread_Change_priority to take a third argument. The new (diff)
downloadrtems-f926b34f663debae055330a9e54ee71fc1f65d12.tar.bz2
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.
Diffstat (limited to 'cpukit/score/src/coremutex.c')
-rw-r--r--cpukit/score/src/coremutex.c16
1 files changed, 9 insertions, 7 deletions
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;
}