From 31036f1dc8a963fb0bc3fc103f63028988314fea Mon Sep 17 00:00:00 2001 From: Sebastian Huber Date: Mon, 18 Jul 2022 09:41:39 +0200 Subject: 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. --- testsuites/psxtests/psx12/init.c | 2 ++ 1 file changed, 2 insertions(+) (limited to 'testsuites/psxtests/psx12/init.c') diff --git a/testsuites/psxtests/psx12/init.c b/testsuites/psxtests/psx12/init.c index 76737b0c3b..6526805313 100644 --- a/testsuites/psxtests/psx12/init.c +++ b/testsuites/psxtests/psx12/init.c @@ -226,6 +226,8 @@ static void *POSIX_Init( void *argument ) puts( "Init: pthread_create - SUCCESSFUL" ); + pthread_setschedprio( pthread_self(), SS_PRIO_LOW ); + /* Align with clock tick */ sleep( 1 ); -- cgit v1.2.3