From 2e9c3d5e2944a8782eac8a12d23af7559873ad0a Mon Sep 17 00:00:00 2001 From: Sebastian Huber Date: Tue, 17 Mar 2015 16:28:50 +0100 Subject: score: Add thread priority change handler Since the thread current priority change and thread queue requeue is performed in one critical section it is possible to simplify the thread queue requeue procedure. Add a thread queue agnostic thread priority change handler so that we are able to use alternative thread queue implementations. Update #2273. --- testsuites/sptests/spintrcritical23/init.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'testsuites/sptests') diff --git a/testsuites/sptests/spintrcritical23/init.c b/testsuites/sptests/spintrcritical23/init.c index 89fea25a12..8536489f5d 100644 --- a/testsuites/sptests/spintrcritical23/init.c +++ b/testsuites/sptests/spintrcritical23/init.c @@ -70,7 +70,7 @@ static void change_priority(rtems_id timer, void *arg) rtems_interrupt_lock_acquire(&ctx->lock, &lock_context); if ( - ctx->priority_generation != ctx->tcb->priority_generation + ctx->priority_generation != ctx->tcb->Priority.generation && scheduler_node_unchanged(ctx) ) { rtems_task_priority priority_interrupt; @@ -113,7 +113,7 @@ static bool test_body(void *arg) priority_interrupt = 1 + (priority_task + 1) % 3; ctx->priority_task = priority_task; ctx->priority_interrupt = priority_interrupt; - ctx->priority_generation = ctx->tcb->priority_generation; + ctx->priority_generation = ctx->tcb->Priority.generation; memcpy( &ctx->scheduler_node, ctx->tcb->Scheduler.node, -- cgit v1.2.3