diff options
author | Sebastian Huber <sebastian.huber@embedded-brains.de> | 2022-07-18 09:41:39 +0200 |
---|---|---|
committer | Sebastian Huber <sebastian.huber@embedded-brains.de> | 2022-07-28 07:52:59 +0200 |
commit | 31036f1dc8a963fb0bc3fc103f63028988314fea (patch) | |
tree | b321873d02cf2acebf775a3d4fe9b73766525ce7 /cpukit/score/src/threadinitialize.c | |
parent | aarch64/versal: Support DDRMC0 region 0 and 1 (diff) | |
download | rtems-31036f1dc8a963fb0bc3fc103f63028988314fea.tar.bz2 |
score: Use priority inheritance for thread join
Threads may join the thread termination of another thread using the
pthread_join() or rtems_task_delete() directives. The thread cancel operation
used a special case priority boosting mechanism implemented by
_Thread_Raise_real_priority(). The problem was that this approach
* is not transitive,
* does not account for priority adjustments of the calling task
while waiting for the join,
* does not support clustered scheduling, and
* does not detect deadlocks.
All these problems are fixed by using a priority inheritance thread queue for
the join operation.
Close #4679.
Diffstat (limited to '')
-rw-r--r-- | cpukit/score/src/threadinitialize.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/cpukit/score/src/threadinitialize.c b/cpukit/score/src/threadinitialize.c index 457fdaa54a..9b37206c6d 100644 --- a/cpukit/score/src/threadinitialize.c +++ b/cpukit/score/src/threadinitialize.c @@ -298,6 +298,7 @@ static bool _Thread_Try_initialize( the_thread->Start.is_preemptible = config->is_preemptible; the_thread->Start.cpu_budget_operations = config->cpu_budget_operations; the_thread->Start.stack_free = config->stack_free; + the_thread->Join_queue.Queue.owner = the_thread; _Thread_Timer_initialize( &the_thread->Timer, cpu ); _Thread_Initialize_scheduler_and_wait_nodes( the_thread, config ); |