diff options
author | Sebastian Huber <sebastian.huber@embedded-brains.de> | 2016-06-22 17:09:23 +0200 |
---|---|---|
committer | Sebastian Huber <sebastian.huber@embedded-brains.de> | 2016-09-21 08:59:26 +0200 |
commit | 300f6a481aaf9e6d29811faca71bf7104a01492c (patch) | |
tree | ba8f18cedb93e3781a2f17aa989c5c805dd18d6a /testsuites/sptests/spsem03 | |
parent | classic networking: do not reference BSP_irq_enabled_at_i8259s which is no mo... (diff) | |
download | rtems-300f6a481aaf9e6d29811faca71bf7104a01492c.tar.bz2 |
score: Rework thread priority management
Add priority nodes which contribute to the overall thread priority.
The actual priority of a thread is now an aggregation of priority nodes.
The thread priority aggregation for the home scheduler instance of a
thread consists of at least one priority node, which is normally the
real priority of the thread. The locking protocols (e.g. priority
ceiling and priority inheritance), rate-monotonic period objects and the
POSIX sporadic server add, change and remove priority nodes.
A thread changes its priority now immediately, e.g. priority changes are
not deferred until the thread releases its last resource.
Replace the _Thread_Change_priority() function with
* _Thread_Priority_perform_actions(),
* _Thread_Priority_add(),
* _Thread_Priority_remove(),
* _Thread_Priority_change(), and
* _Thread_Priority_update().
Update #2412.
Update #2556.
Diffstat (limited to 'testsuites/sptests/spsem03')
-rw-r--r-- | testsuites/sptests/spsem03/init.c | 30 | ||||
-rw-r--r-- | testsuites/sptests/spsem03/spsem03.doc | 4 |
2 files changed, 17 insertions, 17 deletions
diff --git a/testsuites/sptests/spsem03/init.c b/testsuites/sptests/spsem03/init.c index e64a04d326..7f573e5110 100644 --- a/testsuites/sptests/spsem03/init.c +++ b/testsuites/sptests/spsem03/init.c @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014 embedded brains GmbH. All rights reserved. + * Copyright (c) 2014, 2016 embedded brains GmbH. All rights reserved. * * embedded brains GmbH * Dornierstr. 4 @@ -88,20 +88,7 @@ static void obtain_sema(rtems_id id) static void inversion_task(rtems_task_argument arg) { - test_context *ctx = &test_instance; - - /* - * Here we see that the priority of the high priority task blocked on - * semaphore B doesn't propagate to the low priority task owning semaphore A - * on which the owner of semaphore B depends. - */ - assert_prio(ctx->low, 3); - assert_prio(ctx->mid, 1); - assert_prio(ctx->high, 1); - assert_prio(ctx->inversion, 2); - - TEST_END(); - rtems_test_exit(0); + assert(0); } static void mid_task(rtems_task_argument arg) @@ -137,6 +124,19 @@ static void Init(rtems_task_argument arg) obtain_sema(ctx->sem_a); start_task(ctx->mid, mid_task); start_task(ctx->high, high_task); + + /* + * Here we see that the priority of the high priority task blocked on + * semaphore B propagated to the low priority task owning semaphore A + * on which the owner of semaphore B depends. + */ + assert_prio(ctx->low, 1); + assert_prio(ctx->mid, 1); + assert_prio(ctx->high, 1); + assert_prio(ctx->inversion, 2); + + TEST_END(); + rtems_test_exit(0); } #define CONFIGURE_APPLICATION_NEEDS_CLOCK_DRIVER diff --git a/testsuites/sptests/spsem03/spsem03.doc b/testsuites/sptests/spsem03/spsem03.doc index 0310965798..a13430e874 100644 --- a/testsuites/sptests/spsem03/spsem03.doc +++ b/testsuites/sptests/spsem03/spsem03.doc @@ -8,5 +8,5 @@ directives: concepts: - - Demonstrate that the priority inheritance protocol doesn't propagate to - indirectly referenced semaphore owners. + - Demonstrate that the priority inheritance protocol works with indirectly + referenced semaphore owners. |