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/posix/src/cancel.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/posix/src/cancel.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/cpukit/posix/src/cancel.c b/cpukit/posix/src/cancel.c index 300055d68a..0fb2199f0a 100644 --- a/cpukit/posix/src/cancel.c +++ b/cpukit/posix/src/cancel.c @@ -75,7 +75,7 @@ int pthread_cancel( pthread_t thread ) } else { _Thread_Dispatch_disable_with_CPU( cpu_self, &lock_context ); _ISR_lock_ISR_enable( &lock_context ); - _Thread_Cancel( the_thread, executing, PTHREAD_CANCELED ); + (void) _Thread_Cancel( the_thread, executing, 0, PTHREAD_CANCELED ); _Thread_Dispatch_enable( cpu_self ); } return 0; |