summaryrefslogtreecommitdiffstats
path: root/testsuites/validation/tc-task-restart.c
diff options
context:
space:
mode:
authorSebastian Huber <sebastian.huber@embedded-brains.de>2022-07-18 09:41:39 +0200
committerSebastian Huber <sebastian.huber@embedded-brains.de>2022-07-28 07:52:59 +0200
commit31036f1dc8a963fb0bc3fc103f63028988314fea (patch)
treeb321873d02cf2acebf775a3d4fe9b73766525ce7 /testsuites/validation/tc-task-restart.c
parentaarch64/versal: Support DDRMC0 region 0 and 1 (diff)
downloadrtems-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--testsuites/validation/tc-task-restart.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/testsuites/validation/tc-task-restart.c b/testsuites/validation/tc-task-restart.c
index 1c7528e961..f6c3aabd33 100644
--- a/testsuites/validation/tc-task-restart.c
+++ b/testsuites/validation/tc-task-restart.c
@@ -1424,7 +1424,7 @@ static void RtemsTaskReqRestart_Post_State_Check(
T_eq_ptr( event->thread, ctx->worker_tcb );
}
- if ( !ctx->real_priority_is_initial ) {
+ if ( !ctx->real_priority_is_initial && !ctx->terminating ) {
event = T_scheduler_next_any( &ctx->scheduler_log.header, &index );
T_eq_int( event->operation, T_SCHEDULER_UPDATE_PRIORITY );
T_eq_ptr( event->thread, ctx->worker_tcb );
@@ -1464,7 +1464,7 @@ static void RtemsTaskReqRestart_Post_State_Check(
}
}
- if ( !ctx->real_priority_is_initial ) {
+ if ( !ctx->real_priority_is_initial && !ctx->terminating ) {
event = T_scheduler_next_any( &ctx->scheduler_log.header, &index );
T_eq_int( event->operation, T_SCHEDULER_UPDATE_PRIORITY );
T_eq_ptr( event->thread, ctx->worker_tcb );
@@ -1504,7 +1504,7 @@ static void RtemsTaskReqRestart_Post_State_Check(
}
}
- if ( !ctx->real_priority_is_initial ) {
+ if ( !ctx->real_priority_is_initial && !ctx->terminating ) {
event = T_scheduler_next_any( &ctx->scheduler_log.header, &index );
T_eq_int( event->operation, T_SCHEDULER_UPDATE_PRIORITY );
T_eq_ptr( event->thread, ctx->worker_tcb );