summaryrefslogtreecommitdiffstats
path: root/c/src/exec/posix/src/pthread.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 /c/src/exec/posix/src/pthread.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 'c/src/exec/posix/src/pthread.c')
-rw-r--r--c/src/exec/posix/src/pthread.c10
1 files changed, 7 insertions, 3 deletions
diff --git a/c/src/exec/posix/src/pthread.c b/c/src/exec/posix/src/pthread.c
index 5864c22072..b4c1e7e1f4 100644
--- a/c/src/exec/posix/src/pthread.c
+++ b/c/src/exec/posix/src/pthread.c
@@ -77,7 +77,7 @@ void _POSIX_Threads_Sporadic_budget_TSR(
if ( the_thread->resource_count == 0 ||
the_thread->current_priority > new_priority )
- _Thread_Change_priority( the_thread, new_priority );
+ _Thread_Change_priority( the_thread, new_priority, TRUE );
ticks = _POSIX_Timespec_to_interval( &api->schedparam.ss_replenish_period );
@@ -114,7 +114,7 @@ void _POSIX_Threads_Sporadic_budget_callout(
if ( the_thread->resource_count == 0 ||
the_thread->current_priority > new_priority )
- _Thread_Change_priority( the_thread, new_priority );
+ _Thread_Change_priority( the_thread, new_priority, TRUE );
}
/*PAGE
@@ -656,7 +656,11 @@ int pthread_setschedparam(
the_thread->real_priority =
_POSIX_Priority_To_core( api->schedparam.sched_priority );
- _Thread_Change_priority( the_thread, the_thread->real_priority );
+ _Thread_Change_priority(
+ the_thread,
+ the_thread->real_priority,
+ TRUE
+ );
break;
case SCHED_SPORADIC: