summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSebastian Huber <sebastian.huber@embedded-brains.de>2021-12-08 14:59:35 +0100
committerSebastian Huber <sebastian.huber@embedded-brains.de>2021-12-08 17:25:15 +0100
commita6c179979c56d111719805b95b8019b705602459 (patch)
tree5d2478865c09b513176892afd1f1224485723dc1
parent6330e0350256140c621bbfeaaf92bb578858e052 (diff)
testsuites/validation/tx-thread-queue.c
-rw-r--r--testsuites/validation/tx-thread-queue.c9
1 files changed, 8 insertions, 1 deletions
diff --git a/testsuites/validation/tx-thread-queue.c b/testsuites/validation/tx-thread-queue.c
index 49c8f7eda9..1b0e8665c7 100644
--- a/testsuites/validation/tx-thread-queue.c
+++ b/testsuites/validation/tx-thread-queue.c
@@ -486,7 +486,12 @@ void TQInitialize( TQContext *ctx )
ctx->runner_id = rtems_task_self();
ctx->runner_tcb = GetThread( RTEMS_SELF );
- SetSelfPriority( PRIO_NORMAL );
+
+ /*
+ * Use a lower priority than all started worker tasks to make sure they wait
+ * for events.
+ */
+ SetSelfPriority( PRIO_VERY_LOW );
for ( i = 0; i < RTEMS_ARRAY_SIZE( ctx->mutex_id ); ++i ) {
rtems_attribute attributes;
@@ -533,6 +538,8 @@ void TQInitialize( TQContext *ctx )
for (i = 0; i < RTEMS_ARRAY_SIZE( ctx->worker_tcb ); ++i) {
ctx->worker_tcb[ i ] = GetThread( ctx->worker_id[ i ] );
}
+
+ SetSelfPriority( PRIO_NORMAL );
}
void TQDestroy( TQContext *ctx )