diff options
author | Sebastian Huber <sebastian.huber@embedded-brains.de> | 2021-10-08 14:55:27 +0200 |
---|---|---|
committer | Sebastian Huber <sebastian.huber@embedded-brains.de> | 2021-11-11 16:10:25 +0100 |
commit | ce34d7a68f78fea09f111de01332a01a24d087f8 (patch) | |
tree | 1df4c86f93b4bea26e5449e9612c2330968db2ae | |
parent | b9310d9c5e3ac7c0d34c551eeebcd455f4c0eae6 (diff) |
validation: Refine thread queue surrender
-rw-r--r-- | spec/build/testsuites/validation/validation-0.yml | 1 | ||||
-rw-r--r-- | spec/build/testsuites/validation/validation-no-clock-0.yml | 1 | ||||
-rw-r--r-- | testsuites/validation/tc-sys-lock.c | 4 | ||||
-rw-r--r-- | testsuites/validation/tr-mtx-surrender.c | 79 | ||||
-rw-r--r-- | testsuites/validation/tr-mtx-surrender.h | 1 | ||||
-rw-r--r-- | testsuites/validation/tr-tq-surrender-mrsp.c | 1036 | ||||
-rw-r--r-- | testsuites/validation/tr-tq-surrender-mrsp.h | 148 | ||||
-rw-r--r-- | testsuites/validation/tr-tq-surrender-priority-inherit.c | 1239 | ||||
-rw-r--r-- | testsuites/validation/tr-tq-surrender-priority-inherit.h | 29 |
9 files changed, 2238 insertions, 300 deletions
diff --git a/spec/build/testsuites/validation/validation-0.yml b/spec/build/testsuites/validation/validation-0.yml index 42a23a02b2..2a1fd2c779 100644 --- a/spec/build/testsuites/validation/validation-0.yml +++ b/spec/build/testsuites/validation/validation-0.yml @@ -128,6 +128,7 @@ source: - testsuites/validation/tr-tq-flush-priority.c - testsuites/validation/tr-tq-flush-priority-inherit.c - testsuites/validation/tr-tq-surrender.c +- testsuites/validation/tr-tq-surrender-mrsp.c - testsuites/validation/tr-tq-surrender-priority-inherit.c - testsuites/validation/ts-validation-0.c stlib: [] diff --git a/spec/build/testsuites/validation/validation-no-clock-0.yml b/spec/build/testsuites/validation/validation-no-clock-0.yml index 96e1b4a586..97a5eb0f52 100644 --- a/spec/build/testsuites/validation/validation-no-clock-0.yml +++ b/spec/build/testsuites/validation/validation-no-clock-0.yml @@ -48,6 +48,7 @@ source: - testsuites/validation/tr-tq-enqueue-priority.c - testsuites/validation/tr-tq-enqueue-priority-inherit.c - testsuites/validation/tr-tq-surrender.c +- testsuites/validation/tr-tq-surrender-mrsp.c - testsuites/validation/tr-tq-surrender-priority-inherit.c - testsuites/validation/tr-tq-timeout.c - testsuites/validation/tr-tq-timeout-priority-inherit.c diff --git a/testsuites/validation/tc-sys-lock.c b/testsuites/validation/tc-sys-lock.c index d28baac7e2..1d2567de33 100644 --- a/testsuites/validation/tc-sys-lock.c +++ b/testsuites/validation/tc-sys-lock.c @@ -311,7 +311,7 @@ static void NewlibValSysLock_Action_0( NewlibValSysLock_Context *ctx ) /* * Validate the _Mutex_Acquire_timed() timeout behaviour. */ - ctx->tq_mtx_ctx.base.wait = TQ_WAIT_TIMED; + ctx->tq_mtx_ctx.base.wait = TQ_WAIT_FOREVER; ctx->tq_mtx_ctx.recursive = TQ_MTX_RECURSIVE_DEADLOCK; ScoreTqReqTimeoutPriorityInherit_Run( &ctx->tq_mtx_ctx.base @@ -391,7 +391,7 @@ static void NewlibValSysLock_Action_1( NewlibValSysLock_Context *ctx ) /* * Validate the _Mutex_recursive_Acquire_timed() timeout behaviour. */ - ctx->tq_mtx_ctx.base.wait = TQ_WAIT_TIMED; + ctx->tq_mtx_ctx.base.wait = TQ_WAIT_FOREVER; ctx->tq_mtx_ctx.recursive = TQ_MTX_RECURSIVE_ALLOWED; ScoreTqReqTimeoutPriorityInherit_Run( &ctx->tq_mtx_ctx.base diff --git a/testsuites/validation/tr-mtx-surrender.c b/testsuites/validation/tr-mtx-surrender.c index 64fcaa9b1b..cf5b88454a 100644 --- a/testsuites/validation/tr-mtx-surrender.c +++ b/testsuites/validation/tr-mtx-surrender.c @@ -53,6 +53,7 @@ #endif #include "tr-mtx-surrender.h" +#include "tr-tq-surrender-mrsp.h" #include "tr-tq-surrender-priority-inherit.h" #include "tr-tq-surrender.h" @@ -798,13 +799,23 @@ static void ScoreMtxReqSurrender_Post_Surrender_Check( case ScoreMtxReqSurrender_Post_Surrender_PriorityInherit: { /* * The thread queue of the mutex shall be surrendered in priority order - * priority inheritance. + * with priority inheritance. */ T_eq_u32( ctx->counter, 1 ); ScoreTqReqSurrenderPriorityInherit_Run( &ctx->tq_ctx->base ); break; } + case ScoreMtxReqSurrender_Post_Surrender_MrsP: { + /* + * The thread queue of the mutex shall be surrendered in priority order + * with MrsP. + */ + T_eq_u32( ctx->counter, 1 ); + ScoreTqReqSurrenderMrsp_Run( &ctx->tq_ctx->base ); + break; + } + case ScoreMtxReqSurrender_Post_Surrender_NA: break; } @@ -896,10 +907,6 @@ ScoreMtxReqSurrender_Entries[] = { ScoreMtxReqSurrender_Post_Surrender_Nop, ScoreMtxReqSurrender_Post_Priority_Nop }, { 0, 0, 0, 0, 0, 0, 0, 0, 0, ScoreMtxReqSurrender_Post_Status_Ok, - ScoreMtxReqSurrender_Post_Owner_First, - ScoreMtxReqSurrender_Post_Surrender_PriorityInherit, - ScoreMtxReqSurrender_Post_Priority_Nop }, - { 0, 0, 0, 0, 0, 0, 0, 0, 0, ScoreMtxReqSurrender_Post_Status_Ok, ScoreMtxReqSurrender_Post_Owner_None, ScoreMtxReqSurrender_Post_Surrender_Nop, ScoreMtxReqSurrender_Post_Priority_Nop }, @@ -914,7 +921,7 @@ ScoreMtxReqSurrender_Entries[] = { { 0, 0, 0, 0, 0, 0, 0, 0, 0, ScoreMtxReqSurrender_Post_Status_Ok, ScoreMtxReqSurrender_Post_Owner_First, ScoreMtxReqSurrender_Post_Surrender_PriorityInherit, - ScoreMtxReqSurrender_Post_Priority_Low }, + ScoreMtxReqSurrender_Post_Priority_Nop }, { 0, 0, 0, 0, 0, 0, 0, 0, 0, ScoreMtxReqSurrender_Post_Status_Ok, ScoreMtxReqSurrender_Post_Owner_First, ScoreMtxReqSurrender_Post_Surrender_Priority, @@ -925,57 +932,69 @@ ScoreMtxReqSurrender_Entries[] = { ScoreMtxReqSurrender_Post_Priority_Low }, { 0, 0, 0, 0, 0, 0, 0, 0, 0, ScoreMtxReqSurrender_Post_Status_Ok, ScoreMtxReqSurrender_Post_Owner_First, + ScoreMtxReqSurrender_Post_Surrender_MrsP, + ScoreMtxReqSurrender_Post_Priority_Nop }, + { 0, 0, 0, 0, 0, 0, 0, 0, 0, ScoreMtxReqSurrender_Post_Status_Ok, + ScoreMtxReqSurrender_Post_Owner_First, + ScoreMtxReqSurrender_Post_Surrender_PriorityInherit, + ScoreMtxReqSurrender_Post_Priority_Low }, + { 0, 0, 0, 0, 0, 0, 0, 0, 0, ScoreMtxReqSurrender_Post_Status_Ok, + ScoreMtxReqSurrender_Post_Owner_First, ScoreMtxReqSurrender_Post_Surrender_Priority, + ScoreMtxReqSurrender_Post_Priority_Low }, + { 0, 0, 0, 0, 0, 0, 0, 0, 0, ScoreMtxReqSurrender_Post_Status_Ok, + ScoreMtxReqSurrender_Post_Owner_First, + ScoreMtxReqSurrender_Post_Surrender_MrsP, ScoreMtxReqSurrender_Post_Priority_Low } }; static const uint8_t ScoreMtxReqSurrender_Map[] = { - 4, 4, 4, 5, 5, 5, 4, 4, 4, 5, 5, 5, 7, 7, 7, 7, 7, 7, 11, 11, 11, 6, 6, 6, 3, + 4, 4, 4, 5, 5, 5, 4, 4, 4, 5, 5, 5, 7, 7, 7, 7, 7, 7, 10, 10, 10, 6, 6, 6, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 7, 7, 7, - 7, 7, 7, 11, 11, 11, 6, 6, 6, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 2, 2, 2, - 2, 2, 4, 4, 4, 5, 5, 5, 2, 2, 2, 2, 2, 2, 11, 11, 11, 6, 6, 6, 2, 2, 2, 2, 2, + 7, 7, 7, 10, 10, 10, 6, 6, 6, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 2, 2, 2, + 2, 2, 4, 4, 4, 5, 5, 5, 2, 2, 2, 2, 2, 2, 10, 10, 10, 6, 6, 6, 2, 2, 2, 2, 2, 2, 3, 3, 3, 3, 3, 3, 2, 2, 2, 2, 2, 2, 1, 1, 1, 1, 1, 1, 2, 2, 2, 2, 2, 2, - 11, 11, 11, 6, 6, 6, 2, 2, 2, 2, 2, 2, 1, 1, 1, 1, 1, 1, 4, 4, 4, 5, 5, 5, 4, - 4, 4, 5, 5, 5, 7, 7, 7, 7, 7, 7, 12, 12, 12, 6, 6, 6, 3, 3, 3, 3, 3, 3, 3, 3, - 3, 3, 3, 3, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 7, 7, 7, 7, 7, 7, 12, 12, 12, + 10, 10, 10, 6, 6, 6, 2, 2, 2, 2, 2, 2, 1, 1, 1, 1, 1, 1, 4, 4, 4, 5, 5, 5, 4, + 4, 4, 5, 5, 5, 7, 7, 7, 7, 7, 7, 11, 11, 11, 6, 6, 6, 3, 3, 3, 3, 3, 3, 3, 3, + 3, 3, 3, 3, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 7, 7, 7, 7, 7, 7, 11, 11, 11, 6, 6, 6, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 2, 2, 2, 2, 2, 4, 4, 4, 5, 5, - 5, 2, 2, 2, 2, 2, 2, 12, 12, 12, 6, 6, 6, 2, 2, 2, 2, 2, 2, 3, 3, 3, 3, 3, 3, - 2, 2, 2, 2, 2, 2, 1, 1, 1, 1, 1, 1, 2, 2, 2, 2, 2, 2, 12, 12, 12, 6, 6, 6, 2, + 5, 2, 2, 2, 2, 2, 2, 11, 11, 11, 6, 6, 6, 2, 2, 2, 2, 2, 2, 3, 3, 3, 3, 3, 3, + 2, 2, 2, 2, 2, 2, 1, 1, 1, 1, 1, 1, 2, 2, 2, 2, 2, 2, 11, 11, 11, 6, 6, 6, 2, 2, 2, 2, 2, 2, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 4, - 4, 4, 5, 5, 5, 4, 4, 4, 5, 5, 5, 8, 8, 8, 7, 7, 7, 9, 9, 13, 6, 6, 6, 3, 3, + 4, 4, 5, 5, 5, 4, 4, 4, 5, 5, 5, 8, 8, 8, 7, 7, 7, 12, 12, 16, 6, 6, 6, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 8, 8, 8, 7, - 7, 7, 9, 9, 13, 6, 6, 6, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 2, 2, 2, 2, - 2, 4, 4, 4, 5, 5, 5, 2, 2, 2, 2, 2, 2, 9, 9, 13, 6, 6, 6, 2, 2, 2, 2, 2, 2, - 3, 3, 3, 3, 3, 3, 2, 2, 2, 2, 2, 2, 1, 1, 1, 1, 1, 1, 2, 2, 2, 2, 2, 2, 9, 9, - 13, 6, 6, 6, 2, 2, 2, 2, 2, 2, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 7, 7, 12, 12, 16, 6, 6, 6, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 2, 2, 2, 2, + 2, 4, 4, 4, 5, 5, 5, 2, 2, 2, 2, 2, 2, 12, 12, 16, 6, 6, 6, 2, 2, 2, 2, 2, 2, + 3, 3, 3, 3, 3, 3, 2, 2, 2, 2, 2, 2, 1, 1, 1, 1, 1, 1, 2, 2, 2, 2, 2, 2, 12, + 12, 16, 6, 6, 6, 2, 2, 2, 2, 2, 2, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 4, 4, 4, 5, 5, 5, 4, 4, 4, 5, 5, 5, 8, 8, 8, 8, 8, 8, 14, 14, - 16, 10, 10, 15, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 8, 8, 8, 8, 8, 8, 14, 14, 16, 10, 10, 15, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 2, 2, 2, 2, 2, 2, 4, 4, 4, 5, 5, 5, 2, 2, 2, 2, 2, 2, 14, 14, 16, - 10, 10, 15, 2, 2, 2, 2, 2, 2, 3, 3, 3, 3, 3, 3, 2, 2, 2, 2, 2, 2, 1, 1, 1, 1, - 1, 1, 2, 2, 2, 2, 2, 2, 14, 14, 16, 10, 10, 15, 2, 2, 2, 2, 2, 2, 1, 1, 1, 1, + 0, 0, 0, 0, 0, 0, 4, 4, 4, 5, 5, 5, 4, 4, 4, 5, 5, 5, 8, 8, 8, 8, 8, 8, 13, + 13, 17, 9, 9, 14, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 8, 8, 8, 8, 8, 8, 13, 13, 17, 9, 9, 14, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 2, 2, 2, 2, 2, 2, 4, 4, 4, 5, 5, 5, 2, 2, 2, 2, 2, 2, 13, 13, 17, + 9, 9, 14, 2, 2, 2, 2, 2, 2, 3, 3, 3, 3, 3, 3, 2, 2, 2, 2, 2, 2, 1, 1, 1, 1, + 1, 1, 2, 2, 2, 2, 2, 2, 13, 13, 17, 9, 9, 14, 2, 2, 2, 2, 2, 2, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 4, 4, 4, 5, 5, 5, 4, 4, 4, 5, - 5, 5, 8, 8, 8, 8, 8, 8, 9, 9, 13, 10, 10, 15, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, - 3, 3, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 8, 8, 8, 8, 8, 8, 9, 9, 13, 10, 10, - 15, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 2, 2, 2, 2, 2, 4, 4, 4, 5, 5, 5, - 2, 2, 2, 2, 2, 2, 9, 9, 13, 10, 10, 15, 2, 2, 2, 2, 2, 2, 3, 3, 3, 3, 3, 3, - 2, 2, 2, 2, 2, 2, 1, 1, 1, 1, 1, 1, 2, 2, 2, 2, 2, 2, 9, 9, 13, 10, 10, 15, + 5, 5, 8, 8, 8, 8, 8, 8, 15, 15, 18, 9, 9, 14, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, + 3, 3, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 8, 8, 8, 8, 8, 8, 15, 15, 18, 9, 9, + 14, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 2, 2, 2, 2, 2, 4, 4, 4, 5, 5, 5, + 2, 2, 2, 2, 2, 2, 15, 15, 18, 9, 9, 14, 2, 2, 2, 2, 2, 2, 3, 3, 3, 3, 3, 3, + 2, 2, 2, 2, 2, 2, 1, 1, 1, 1, 1, 1, 2, 2, 2, 2, 2, 2, 15, 15, 18, 9, 9, 14, 2, 2, 2, 2, 2, 2, 1, 1, 1, 1, 1, 1 }; diff --git a/testsuites/validation/tr-mtx-surrender.h b/testsuites/validation/tr-mtx-surrender.h index ff8670ba72..79b044d184 100644 --- a/testsuites/validation/tr-mtx-surrender.h +++ b/testsuites/validation/tr-mtx-surrender.h @@ -134,6 +134,7 @@ typedef enum { ScoreMtxReqSurrender_Post_Surrender_FIFO, ScoreMtxReqSurrender_Post_Surrender_Priority, ScoreMtxReqSurrender_Post_Surrender_PriorityInherit, + ScoreMtxReqSurrender_Post_Surrender_MrsP, ScoreMtxReqSurrender_Post_Surrender_NA } ScoreMtxReqSurrender_Post_Surrender; diff --git a/testsuites/validation/tr-tq-surrender-mrsp.c b/testsuites/validation/tr-tq-surrender-mrsp.c new file mode 100644 index 0000000000..74d400e3e8 --- /dev/null +++ b/testsuites/validation/tr-tq-surrender-mrsp.c @@ -0,0 +1,1036 @@ +/* SPDX-License-Identifier: BSD-2-Clause */ + +/** + * @file + * + * @ingroup RTEMSTestCaseScoreTqReqSurrenderMrsp + */ + +/* + * Copyright (C) 2021 embedded brains GmbH (http://www.embedded-brains.de) + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" + * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE + * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF + * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS + * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN + * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGE. + */ + +/* + * This file is part of the RTEMS quality process and was automatically + * generated. If you find something that needs to be fixed or + * worded better please post a report or patch to an RTEMS mailing list + * or raise a bug report: + * + * https://www.rtems.org/bugs.html + * + * For information on updating and regenerating please refer to the How-To + * section in the Software Requirements Engineering chapter of the + * RTEMS Software Engineering manual. The manual is provided as a part of + * a release. For development sources please refer to the online + * documentation at: + * + * https://docs.rtems.org + */ + +#ifdef HAVE_CONFIG_H +#include "config.h" +#endif + +#include <rtems/score/threadimpl.h> + +#include "tr-tq-surrender-mrsp.h" +#include "tx-support.h" + +#include <rtems/test.h> + +/** + * @defgroup RTEMSTestCaseScoreTqReqSurrenderMrsp \ + * spec:/score/tq/req/surrender-mrsp + * + * @ingroup RTEMSTestSuiteTestsuitesValidation0 + * @ingroup RTEMSTestSuiteTestsuitesValidationNoClock0 + * + * @{ + */ + +typedef struct { + uint32_t Skip : 1; + uint32_t Pre_InheritedPriority_NA : 1; + uint32_t Pre_PreviousHelping_NA : 1; + uint32_t Pre_Scheduler_NA : 1; + uint32_t Pre_NewHelping_NA : 1; + uint32_t Pre_Suspended_NA : 1; + uint32_t Pre_WaitState_NA : 1; + uint32_t Post_Dequeue : 1; + uint32_t Post_Unblock : 1; + uint32_t Post_PreviousOwnerPriority : 2; + uint32_t Post_RemoveHelper : 2; + uint32_t Post_AddHelper : 2; + uint32_t Post_Suspended : 2; +} ScoreTqReqSurrenderMrsp_Entry; + +/** + * @brief Test context for spec:/score/tq/req/surrender-mrsp test case. + */ +typedef struct { + /** + * @brief If this member is true, then all priorities of the previous owner + * inherited from the thread queue thread shall be dispensable. + */ + bool inherited_priorities_are_dispensible; + + /** + * @brief If this member is true, then all helping schedulers of the previous + * owner thread gained through the thread queue shall be dispensable. + */ + bool helping_schedules_are_dispensible; + + /** + * @brief If this member is true, then the previous owner thread shall use + * helping scheduler. + */ + bool use_helping_scheduler; + + /** + * @brief If this member is true, then the new owner thread shall gain a + * vital helping scheduler. + */ + bool gains_new_helping_scheduler; + + /** + * @brief If this member is true, then the new owner thread shall be + * suspended. + */ + bool suspended; + + /** + * @brief If this member is true, then the new owner thread shall be in the + * intend to block wait state. + */ + bool intend_to_block; + + /** + * @brief This member contains the current priority of the previous owner + * thread before the thread queue surrender operation. + */ + rtems_task_priority priority_before; + + /** + * @brief This member contains the current priority of the previous owner + * thread after the thread queue surrender operation. + */ + rtems_task_priority priority_after; + + /** + * @brief This member contains the identifier of the previous owner thread. + */ + rtems_id previous_owner; + + /** + * @brief This member contains a copy of the corresponding + * ScoreTqReqSurrenderMrsp_Run() parameter. + */ + TQContext *tq_ctx; + + struct { + /** + * @brief This member defines the pre-condition states for the next action. + */ + size_t pcs[ 6 ]; + + /** + * @brief If this member is true, then the test action loop is executed. + */ + bool in_action_loop; + + /** + * @brief This member contains the next transition map index. + */ + size_t index; + + /** + * @brief This member contains the current transition map entry. + */ + ScoreTqReqSurrenderMrsp_Entry entry; + + /** + * @brief If this member is true, then the current transition variant + * should be skipped. + */ + bool skip; + } Map; +} ScoreTqReqSurrenderMrsp_Context; + +static ScoreTqReqSurrenderMrsp_Context + ScoreTqReqSurrenderMrsp_Instance; + +static const char * const ScoreTqReqSurrenderMrsp_PreDesc_InheritedPriority[] = { + "Vital", + "Dispensable", + "NA" +}; + +static const char * const ScoreTqReqSurrenderMrsp_PreDesc_PreviousHelping[] = { + "Vital", + "Dispensable", + "NA" +}; + +static const char * const ScoreTqReqSurrenderMrsp_PreDesc_Scheduler[] = { + "Home", + "Helping", + "NA" +}; + +static const char * const ScoreTqReqSurrenderMrsp_PreDesc_NewHelping[] = { + "Vital", + "Dispensable", + "NA" +}; + +static const char * const ScoreTqReqSurrenderMrsp_PreDesc_Suspended[] = { + "Yes", + "No", + "NA" +}; + +static const char * const ScoreTqReqSurrenderMrsp_PreDesc_WaitState[] = { + "IntendToBlock", + "NA" +}; + +static const char * const * const ScoreTqReqSurrenderMrsp_PreDesc[] = { + ScoreTqReqSurrenderMrsp_PreDesc_InheritedPriority, + ScoreTqReqSurrenderMrsp_PreDesc_PreviousHelping, + ScoreTqReqSurrenderMrsp_PreDesc_Scheduler, + ScoreTqReqSurrenderMrsp_PreDesc_NewHelping, + ScoreTqReqSurrenderMrsp_PreDesc_Suspended, + ScoreTqReqSurrenderMrsp_PreDesc_WaitState, + NULL +}; + +typedef ScoreTqReqSurrenderMrsp_Context Context; + +static const rtems_tcb *GetUnblock( Context *ctx, size_t *index ) +{ + return TQGetNextUnblock( ctx->tq_ctx, index )->thread; +} + +static void ScoreTqReqSurrenderMrsp_Pre_InheritedPriority_Prepare( + ScoreTqReqSurrenderMrsp_Context *ctx, + ScoreTqReqSurrenderMrsp_Pre_InheritedPriority state +) +{ + switch ( state ) { + case ScoreTqReqSurrenderMrsp_Pre_InheritedPriority_Vital: { + /* + * While at least one priority inherited through the thread queue for the + * previous owner is the highest priority of the previous owner. + */ + ctx->inherited_priorities_are_dispensible = false; + break; + } + + case ScoreTqReqSurrenderMrsp_Pre_InheritedPriority_Dispensable: { + /* + * While all priorities inherited through the thread queue for the + * previous owner are not the highest priority of the previous owner. + */ + ctx->inherited_priorities_are_dispensible = true; + break; + } + + case ScoreTqReqSurrenderMrsp_Pre_InheritedPriority_NA: + break; + } +} + +static void ScoreTqReqSurrenderMrsp_Pre_PreviousHelping_Prepare( + ScoreTqReqSurrenderMrsp_Context *ctx, + ScoreTqReqSurrenderMrsp_Pre_PreviousHelping state +) +{ + switch ( state ) { + case ScoreTqReqSurrenderMrsp_Pre_PreviousHelping_Vital: { + /* + * While at least one helping scheduler of the previous owner is only + * available due to a priority inherited through the thread queue. + */ + ctx->helping_schedules_are_dispensible = false; + break; + } + + case ScoreTqReqSurrenderMrsp_Pre_PreviousHelping_Dispensable: { + /* + * While all helping scheduler of the previous owner are not only + * available due to a priority inherited through the thread queue. + */ + ctx->helping_schedules_are_dispensible = true; + break; + } + + case ScoreTqReqSurrenderMrsp_Pre_PreviousHelping_NA: + break; + } +} + +static void ScoreTqReqSurrenderMrsp_Pre_Scheduler_Prepare( + ScoreTqReqSurrenderMrsp_Context *ctx, + ScoreTqReqSurrenderMrsp_Pre_Scheduler state +) +{ + switch ( state ) { + case ScoreTqReqSurrenderMrsp_Pre_Scheduler_Home: { + /* + * While the previous owner executes in its home scheduler. + */ + ctx->use_helping_scheduler = false; + break; + } + + case ScoreTqReqSurrenderMrsp_Pre_Scheduler_Helping: { + /* + * While the previous owner executes in a helping scheduler which is + * available due to a priority inherited through the thread queue. + */ + ctx->use_helping_scheduler = true; + break; + } + + case ScoreTqReqSurrenderMrsp_Pre_Scheduler_NA: + break; + } +} + +static void ScoreTqReqSurrenderMrsp_Pre_NewHelping_Prepare( + ScoreTqReqSurrenderMrsp_Context *ctx, + ScoreTqReqSurrenderMrsp_Pre_NewHelping state +) +{ + switch ( state ) { + case ScoreTqReqSurrenderMrsp_Pre_NewHelping_Vital: { + /* + * While at least one helping scheduler of the new owner is only + * available due to a priority inherited through the thread queue. + */ + ctx->gains_new_helping_scheduler = true; + break; + } + + case ScoreTqReqSurrenderMrsp_Pre_NewHelping_Dispensable: { + /* + * While all helping scheduler of the new owner are not only available + * due to a priority inherited through the thread queue. + */ + ctx->gains_new_helping_scheduler = false; + break; + } + + case ScoreTqReqSurrenderMrsp_Pre_NewHelping_NA: + break; + } +} + +static void ScoreTqReqSurrenderMrsp_Pre_Suspended_Prepare( + ScoreTqReqSurrenderMrsp_Context *ctx, + ScoreTqReqSurrenderMrsp_Pre_Suspended state +) +{ + switch ( state ) { + case ScoreTqReqSurrenderMrsp_Pre_Suspended_Yes: { + /* + * Whiel the new owner is suspended. + */ + ctx->suspended = true; + break; + } + + case ScoreTqReqSurrenderMrsp_Pre_Suspended_No: { + /* + * Whiel the new owner is not suspended. + */ + ctx->suspended = false; + break; + } + + case ScoreTqReqSurrenderMrsp_Pre_Suspended_NA: + break; + } +} + +static void ScoreTqReqSurrenderMrsp_Pre_WaitState_Prepare( + ScoreTqReqSurrenderMrsp_Context *ctx, + ScoreTqReqSurrenderMrsp_Pre_WaitState state +) +{ + switch ( state ) { + case ScoreTqReqSurrenderMrsp_Pre_WaitState_IntendToBlock: { + /* + * While the new owner is in the intend to block wait state. + */ + ctx->intend_to_block = true; + break; + } + + case ScoreTqReqSurrenderMrsp_Pre_WaitState_NA: + break; + } +} + +static void ScoreTqReqSurrenderMrsp_Post_Dequeue_Check( + ScoreTqReqSurrenderMrsp_Context *ctx, + ScoreTqReqSurrenderMrsp_Post_Dequeue state +) +{ + switch ( state ) { + case ScoreTqReqSurrenderMrsp_Post_Dequeue_Priority: { + /* + * The first thread in priority order shall be dequeued from the thread + * queue. + */ + /* Validation is done by spec:/score/tq/req/enqueue-priority */ + break; + } + + case ScoreTqReqSurrenderMrsp_Post_Dequeue_NA: + break; + } +} + +static void ScoreTqReqSurrenderMrsp_Post_Unblock_Check( + ScoreTqReqSurrenderMrsp_Context *ctx, + ScoreTqReqSurrenderMrsp_Post_Unblock state +) +{ + size_t i; + + i = 0; + + switch ( state ) { + case ScoreTqReqSurrenderMrsp_Post_Unblock_No: { + /* + * The dequeued thread shall not be unblocked by the thread queue + * surrender operation. + */ + T_eq_ptr( GetUnblock( ctx, &i ), NULL ); + break; + } + + case ScoreTqReqSurrenderMrsp_Post_Unblock_NA: + break; + } +} + +static void ScoreTqReqSurrenderMrsp_Post_PreviousOwnerPriority_Check( + ScoreTqReqSurrenderMrsp_Context *ctx, + ScoreTqReqSurrenderMrsp_Post_PreviousOwnerPriority state +) +{ + switch ( state ) { + case ScoreTqReqSurrenderMrsp_Post_PreviousOwnerPriority_Drop: { + /* + * Each eligible priority of the previous owner which had the highest + * priority inherited through the thread queue shall be updated. + */ + T_eq_u32( ctx->priority_after, PRIO_NORMAL ); + break; + } + + case ScoreTqReqSurrenderMrsp_Post_PreviousOwnerPriority_Nop: { + /* + * No eligible priority of the previous owner shall be updated. + */ + T_eq_u32( ctx->priority_after, ctx->priority_before ); + break; + } + + case ScoreTqReqSurrenderMrsp_Post_PreviousOwnerPriority_NA: + break; + } +} + +static void ScoreTqReqSurrenderMrsp_Post_RemoveHelper_Check( + ScoreTqReqSurrenderMrsp_Context *ctx, + ScoreTqReqSurrenderMrsp_Post_RemoveHelper state +) +{ + rtems_status_code sc; + rtems_task_priority priority; + + switch ( state ) { + case ScoreTqReqSurrenderMrsp_Post_RemoveHelper_Yes: { + /* + * Each helping scheduler of the previous owner which was only available + * due to a priority inherited through the thread queue shall be removed + * from the previous owner. + */ + sc = rtems_task_get_priority( + ctx->previous_owner, + SCHEDULER_B_ID, + &priority + ); + T_rsc( sc, RTEMS_NOT_DEFINED ); + break; + } + + case ScoreTqReqSurrenderMrsp_Post_RemoveHelper_No: { + /* + * No helping scheduler shall be removed from the previous owner. + */ + sc = rtems_task_get_priority( + ctx->previous_owner, + SCHEDULER_B_ID, + &priority + ); + #if defined(RTEMS_SMP) + T_rsc_success( sc ); + + if ( ctx->tq_ctx->enqueue_variant == TQ_ENQUEUE_STICKY ) { + T_eq_u32( priority, PRIO_LOW ); + } else { + T_eq_u32( priority, PRIO_HIGH ); + } + #else + T_rsc( sc, RTEMS_INVALID_ID ); + #endif + break; + } + + case ScoreTqReqSurrenderMrsp_Post_RemoveHelper_NA: + break; + } +} + +static void ScoreTqReqSurrenderMrsp_Post_AddHelper_Check( + ScoreTqReqSurrenderMrsp_Context *ctx, + ScoreTqReqSurrenderMrsp_Post_AddHelper state +) +{ + rtems_status_code sc; + rtems_task_priority priority; + + switch ( state ) { + case ScoreTqReqSurrenderMrsp_Post_AddHelper_Yes: { + /* + * Each helping scheduler of the new owner which is only available due to + * a priority inherited through the thread queue shall be added to the + * new owner. + */ + sc = rtems_task_get_priority( + ctx->tq_ctx->worker_id[ TQ_BLOCKER_A ], + SCHEDULER_A_ID, + &priority + ); + T_rsc_success( sc ); + + if ( ctx->tq_ctx->enqueue_variant == TQ_ENQUEUE_STICKY ) { + T_eq_u32( priority, PRIO_VERY_HIGH ); + } else { + T_eq_u32( priority, PRIO_LOW ); + } + break; + } + + case ScoreTqReqSurrenderMrsp_Post_AddHelper_No: { + /* + * No helping scheduler shall added to the new owner. + */ + sc = rtems_task_get_priority( + ctx->tq_ctx->worker_id[ TQ_BLOCKER_A ], + SCHEDULER_A_ID, + &priority + ); + #if defined(RTEMS_SMP) + T_rsc( sc, RTEMS_NOT_DEFINED ); + #else + T_rsc_success( sc ); + T_eq_u32( priority, PRIO_HIGH ); + #endif + break; + } + + case ScoreTqReqSurrenderMrsp_Post_AddHelper_NA: + break; + } +} + +static void ScoreTqReqSurrenderMrsp_Post_Suspended_Check( + ScoreTqReqSurrenderMrsp_Context *ctx, + ScoreTqReqSurrenderMrsp_Post_Suspended state +) +{ + switch ( state ) { + case ScoreTqReqSurrenderMrsp_Post_Suspended_Yes: { + /* + * The new owner shall be suspended. + */ + T_true( IsTaskSuspended( ctx->tq_ctx->worker_id[ TQ_BLOCKER_A ] ) ); + break; + } + + case ScoreTqReqSurrenderMrsp_Post_Suspended_No: { + /* + * The new owner shall be not suspended. + */ + T_false( IsTaskSuspended( ctx->tq_ctx->worker_id[ TQ_BLOCKER_A ] ) ); + break; + } + + case ScoreTqReqSurrenderMrsp_Post_Suspended_NA: + break; + } +} + +static void ScoreTqReqSurrenderMrsp_Setup( + ScoreTqReqSurrenderMrsp_Context *ctx +) +{ + TQReset( ctx->tq_ctx ); + TQSetScheduler( ctx->tq_ctx, TQ_BLOCKER_A, SCHEDULER_B_ID, PRIO_NORMAL ); + TQSetPriority( ctx->tq_ctx, TQ_BLOCKER_B, PRIO_VERY_HIGH ); + TQSetScheduler( ctx->tq_ctx, TQ_BLOCKER_C, SCHEDULER_B_ID, PRIO_LOW ); + TQSetPriority( ctx->tq_ctx, TQ_BLOCKER_D, PRIO_VERY_HIGH ); + TQSetPriority( ctx->tq_ctx, TQ_HELPER_A, PRIO_NORMAL ); +} + +static void ScoreTqReqSurrenderMrsp_Setup_Wrap( void *arg ) +{ + ScoreTqReqSurrenderMrsp_Context *ctx; + + ctx = arg; + ctx->Map.in_action_loop = false; + ScoreTqReqSurrenderMrsp_Setup( ctx ); +} + +static void ScoreTqReqSurrenderMrsp_Teardown( + ScoreTqReqSurrenderMrsp_Context *ctx +) +{ + SetSelfScheduler( SCHEDULER_A_ID, PRIO_NORMAL ); +} + +static void ScoreTqReqSurrenderMrsp_Teardown_Wrap( void *arg ) +{ + ScoreTqReqSurrenderMrsp_Context *ctx; + + ctx = arg; + ctx->Map.in_action_loop = false; + ScoreTqReqSurrenderMrsp_Teardown( ctx ); +} + +static void ScoreTqReqSurrenderMrsp_Prepare( + ScoreTqReqSurrenderMrsp_Context *ctx +) +{ + ctx->inherited_priorities_are_dispensible = true; + ctx->helping_schedules_are_dispensible = true; + ctx->use_helping_scheduler = false; + ctx->gains_new_helping_scheduler = false; + ctx->intend_to_block = false; +} + +static void ScoreTqReqSurrenderMrsp_Action( + ScoreTqReqSurrenderMrsp_Context *ctx +) +{ + ctx->previous_owner = ctx->tq_ctx->worker_id[ TQ_HELPER_A ]; + + SetSelfPriority( PRIO_LOW ); + + if ( + ctx->inherited_priorities_are_dispensible || + ctx->helping_schedules_are_dispensible + ) { + TQSend( ctx->tq_ctx, TQ_HELPER_A, TQ_EVENT_MUTEX_A_OBTAIN ); + + if ( ctx->inherited_priorities_are_dispensible ) { + TQSend( ctx->tq_ctx, TQ_BLOCKER_B, TQ_EVENT_MUTEX_A_OBTAIN ); + } + + if ( ctx->helping_schedules_are_dispensible ) { + TQSendAndWaitForExecutionStop( + ctx->tq_ctx, + TQ_BLOCKER_C, + TQ_EVENT_MUTEX_A_OBTAIN + ); + } + } + + /* + * Take only the priorities into account which are inherited from the + * priority inheritance mutex. This avoids having to deal with the ceiling + * priority. + */ + ctx->priority_before = TQGetPriority( ctx->tq_ctx, TQ_HELPER_A ); + + SetSelfScheduler( SCHEDULER_B_ID, PRIO_ULTRA_HIGH ); + ctx->tq_ctx->busy_wait[ TQ_HELPER_A ] = true; + TQSendAndSynchronizeRunner( + ctx->tq_ctx, + TQ_HELPER_A, + TQ_EVENT_ENQUEUE | TQ_EVENT_BUSY_WAIT + ); + SetSelfScheduler( SCHEDULER_A_ID, PRIO_ULTRA_HIGH ); + + TQSendAndWaitForIntendToBlock( + ctx->tq_ctx, + TQ_BLOCKER_A, + TQ_EVENT_ENQUEUE + ); + + SetSelfScheduler( SCHEDULER_B_ID, PRIO_ULTRA_HIGH ); + + if ( ctx->gains_new_helping_scheduler ) { + TQSend( + ctx->tq_ctx, + TQ_BLOCKER_D, + TQ_EVENT_ENQUEUE + ); + YieldTask( ctx->tq_ctx->worker_id[ TQ_HELPER_A ] ); + TQWaitForEventsReceived( ctx->tq_ctx, TQ_BLOCKER_D ); + TQWaitForIntendToBlock( ctx->tq_ctx, TQ_BLOCKER_D ); + YieldTask( ctx->tq_ctx->worker_id[ TQ_BLOCKER_D ] ); + } + + if ( ctx->use_helping_scheduler ) { + SetSelfScheduler( SCHEDULER_A_ID, PRIO_ULTRA_HIGH ); + } + + if ( ctx->suspended ) { + SuspendTask( ctx->tq_ctx->worker_id[ TQ_BLOCKER_A ] ); + } + + ctx->tq_ctx->busy_wait[ TQ_HELPER_A ] = false; + TQSendAndWaitForExecutionStop( + ctx->tq_ctx, + TQ_HELPER_A, + TQ_EVENT_SCHEDULER_RECORD_START | + TQ_EVENT_SURRENDER + ); + TQSchedulerRecordStop( ctx->tq_ctx ); + T_eq_ptr( + TQGetOwner( ctx->tq_ctx ), + ctx->tq_ctx->worker_tcb[ TQ_BLOCKER_A ] + ); + ctx->priority_after = TQGetPriority( ctx->tq_ctx, TQ_HELPER_A ); +} + +static void ScoreTqReqSurrenderMrsp_Cleanup( + ScoreTqReqSurrenderMrsp_Context *ctx +) +{ + SetSelfScheduler( SCHEDULER_A_ID, PRIO_ULTRA_HIGH ); + + if ( ctx->suspended ) { + ResumeTask( ctx->tq_ctx->worker_id[ TQ_BLOCKER_A ] ); + } + + TQSendAndSynchronizeRunner( + ctx->tq_ctx, + TQ_BLOCKER_A, + TQ_EVENT_SURRENDER + ); + + if ( ctx->gains_new_helping_scheduler ) { + TQSendAndSynchronizeRunner( + ctx->tq_ctx, + TQ_BLOCKER_D, + TQ_EVENT_SURRENDER + ); + } + + if ( + ctx->inherited_priorities_are_dispensible || + ctx->helping_schedules_are_dispensible + ) { + TQSendAndSynchronizeRunner( + ctx->tq_ctx, + TQ_HELPER_A, + TQ_EVENT_MUTEX_A_RELEASE + ); + + if ( ctx->inherited_priorities_are_dispensible ) { + TQSendAndSynchronizeRunner( + ctx->tq_ctx, + TQ_BLOCKER_B, + TQ_EVENT_MUTEX_A_RELEASE + ); + } + + if ( ctx->helping_schedules_are_dispensible ) { + TQSendAndSynchronizeRunner( + ctx->tq_ctx, + TQ_BLOCKER_C, + TQ_EVENT_MUTEX_A_RELEASE + ); + } + } + + T_eq_u32( rtems_scheduler_get_processor(), 0 ); +} + +static const ScoreTqReqSurrenderMrsp_Entry +ScoreTqReqSurrenderMrsp_Entries[] = { + { 0, 0, 0, 0, 0, 0, 0, ScoreTqReqSurrenderMrsp_Post_Dequeue_Priority, + ScoreTqReqSurrenderMrsp_Post_Unblock_No, + ScoreTqReqSurrenderMrsp_Post_PreviousOwnerPriority_Drop, + ScoreTqReqSurrenderMrsp_Post_RemoveHelper_Yes, + ScoreTqReqSurrenderMrsp_Post_AddHelper_Yes, + ScoreTqReqSurrenderMrsp_Post_Suspended_Yes }, + { 0, 0, 0, 0, 0, 0, 0, ScoreTqReqSurrenderMrsp_Post_Dequeue_Priority, + ScoreTqReqSurrenderMrsp_Post_Unblock_No, + ScoreTqReqSurrenderMrsp_Post_PreviousOwnerPriority_Drop, + ScoreTqReqSurrenderMrsp_Post_RemoveHelper_Yes, + ScoreTqReqSurrenderMrsp_Post_AddHelper_Yes, + ScoreTqReqSurrenderMrsp_Post_Suspended_No }, + { 0, 0, 0, 0, 0, 0, 0, ScoreTqReqSurrenderMrsp_Post_Dequeue_Priority, + ScoreTqReqSurrenderMrsp_Post_Unblock_No, + ScoreTqReqSurrenderMrsp_Post_PreviousOwnerPriority_Drop, + ScoreTqReqSurrenderMrsp_Post_RemoveHelper_Yes, + ScoreTqReqSurrenderMrsp_Post_AddHelper_No, + ScoreTqReqSurrenderMrsp_Post_Suspended_Yes }, + { 0, 0, 0, 0, 0, 0, 0, ScoreTqReqSurrenderMrsp_Post_Dequeue_Priority, + ScoreTqReqSurrenderMrsp_Post_Unblock_No, + ScoreTqReqSurrenderMrsp_Post_PreviousOwnerPriority_Drop, + ScoreTqReqSurrenderMrsp_Post_RemoveHelper_Yes, + ScoreTqReqSurrenderMrsp_Post_AddHelper_No, + ScoreTqReqSurrenderMrsp_Post_Suspended_No }, + { 0, 0, 0, 0, 0, 0, 0, ScoreTqReqSurrenderMrsp_Post_Dequeue_Priority, + ScoreTqReqSurrenderMrsp_Post_Unblock_No, + ScoreTqReqSurrenderMrsp_Post_PreviousOwnerPriority_Drop, + ScoreTqReqSurrenderMrsp_Post_RemoveHelper_No, + ScoreTqReqSurrenderMrsp_Post_AddHelper_Yes, + ScoreTqReqSurrenderMrsp_Post_Suspended_Yes }, + { 0, 0, 0, 0, 0, 0, 0, ScoreTqReqSurrenderMrsp_Post_Dequeue_Priority, + ScoreTqReqSurrenderMrsp_Post_Unblock_No, + ScoreTqReqSurrenderMrsp_Post_PreviousOwnerPriority_Drop, + ScoreTqReqSurrenderMrsp_Post_RemoveHelper_No, + ScoreTqReqSurrenderMrsp_Post_AddHelper_Yes, + ScoreTqReqSurrenderMrsp_Post_Suspended_No }, + { 0, 0, 0, 0, 0, 0, 0, ScoreTqReqSurrenderMrsp_Post_Dequeue_Priority, + ScoreTqReqSurrenderMrsp_Post_Unblock_No, + ScoreTqReqSurrenderMrsp_Post_PreviousOwnerPriority_Drop, + ScoreTqReqSurrenderMrsp_Post_RemoveHelper_No, + ScoreTqReqSurrenderMrsp_Post_AddHelper_No, + ScoreTqReqSurrenderMrsp_Post_Suspended_Yes }, + { 0, 0, 0, 0, 0, 0, 0, ScoreTqReqSurrenderMrsp_Post_Dequeue_Priority, + ScoreTqReqSurrenderMrsp_Post_Unblock_No, + ScoreTqReqSurrenderMrsp_Post_PreviousOwnerPriority_Drop, + ScoreTqReqSurrenderMrsp_Post_RemoveHelper_No, + ScoreTqReqSurrenderMrsp_Post_AddHelper_No, + ScoreTqReqSurrenderMrsp_Post_Suspended_No }, + { 0, 0, 0, 0, 0, 0, 0, ScoreTqReqSurrenderMrsp_Post_Dequeue_Priority, + ScoreTqReqSurrenderMrsp_Post_Unblock_No, + ScoreTqReqSurrenderMrsp_Post_PreviousOwnerPriority_Nop, + ScoreTqReqSurrenderMrsp_Post_RemoveHelper_Yes, + ScoreTqReqSurrenderMrsp_Post_AddHelper_Yes, + ScoreTqReqSurrenderMrsp_Post_Suspended_Yes }, + { 0, 0, 0, 0, 0, 0, 0, ScoreTqReqSurrenderMrsp_Post_Dequeue_Priority, + ScoreTqReqSurrenderMrsp_Post_Unblock_No, + ScoreTqReqSurrenderMrsp_Post_PreviousOwnerPriority_Nop, + ScoreTqReqSurrenderMrsp_Post_RemoveHelper_Yes, + ScoreTqReqSurrenderMrsp_Post_AddHelper_Yes, + ScoreTqReqSurrenderMrsp_Post_Suspended_No }, + { 0, 0, 0, 0, 0, 0, 0, ScoreTqReqSurrenderMrsp_Post_Dequeue_Priority, + ScoreTqReqSurrenderMrsp_Post_Unblock_No, + ScoreTqReqSurrenderMrsp_Post_PreviousOwnerPriority_Nop, + ScoreTqReqSurrenderMrsp_Post_RemoveHelper_Yes, + ScoreTqReqSurrenderMrsp_Post_AddHelper_No, + ScoreTqReqSurrenderMrsp_Post_Suspended_Yes }, + { 0, 0, 0, 0, 0, 0, 0, ScoreTqReqSurrenderMrsp_Post_Dequeue_Priority, + ScoreTqReqSurrenderMrsp_Post_Unblock_No, + ScoreTqReqSurrenderMrsp_Post_PreviousOwnerPriority_Nop, + ScoreTqReqSurrenderMrsp_Post_RemoveHelper_Yes, + ScoreTqReqSurrenderMrsp_Post_AddHelper_No, + ScoreTqReqSurrenderMrsp_Post_Suspended_No }, + { 0, 0, 0, 0, 0, 0, 0, ScoreTqReqSurrenderMrsp_Post_Dequeue_Priority, + ScoreTqReqSurrenderMrsp_Post_Unblock_No, + ScoreTqReqSurrenderMrsp_Post_PreviousOwnerPriority_Nop, + ScoreTqReqSurrenderMrsp_Post_RemoveHelper_No, + ScoreTqReqSurrenderMrsp_Post_AddHelper_Yes, + ScoreTqReqSurrenderMrsp_Post_Suspended_Yes }, + { 0, 0, 0, 0, 0, 0, 0, ScoreTqReqSurrenderMrsp_Post_Dequeue_Priority, + ScoreTqReqSurrenderMrsp_Post_Unblock_No, + ScoreTqReqSurrenderMrsp_Post_PreviousOwnerPriority_Nop, + ScoreTqReqSurrenderMrsp_Post_RemoveHelper_No, + ScoreTqReqSurrenderMrsp_Post_AddHelper_Yes, + ScoreTqReqSurrenderMrsp_Post_Suspended_No }, + { 0, 0, 0, 0, 0, 0, 0, ScoreTqReqSurrenderMrsp_Post_Dequeue_Priority, + ScoreTqReqSurrenderMrsp_Post_Unblock_No, + ScoreTqReqSurrenderMrsp_Post_PreviousOwnerPriority_Nop, + ScoreTqReqSurrenderMrsp_Post_RemoveHelper_No, + ScoreTqReqSurrenderMrsp_Post_AddHelper_No, + ScoreTqReqSurrenderMrsp_Post_Suspended_Yes }, + { 0, 0, 0, 0, 0, 0, 0, ScoreTqReqSurrenderMrsp_Post_Dequeue_Priority, + ScoreTqReqSurrenderMrsp_Post_Unblock_No, + ScoreTqReqSurrenderMrsp_Post_PreviousOwnerPriority_Nop, + ScoreTqReqSurrenderMrsp_Post_RemoveHelper_No, + ScoreTqReqSurrenderMrsp_Post_AddHelper_No, + ScoreTqReqSurrenderMrsp_Post_Suspended_No } +}; + +static const uint8_t +ScoreTqReqSurrenderMrsp_Map[] = { + 0, 1, 2, 3, 0, 1, 2, 3, 4, 5, 6, 7, 4, 5, 6, 7, 8, 9, 10, 11, 8, 9, 10, 11, + 12, 13, 14, 15, 12, 13, 14, 15 +}; + +static size_t ScoreTqReqSurrenderMrsp_Scope( void *arg, char *buf, size_t n ) +{ + ScoreTqReqSurrenderMrsp_Context *ctx; + + ctx = arg; + + if ( ctx->Map.in_action_loop ) { + return T_get_scope( + ScoreTqReqSurrenderMrsp_PreDesc, + buf, + n, + ctx->Map.pcs + ); + } + + return 0; +} + +static T_fixture ScoreTqReqSurrenderMrsp_Fixture = { + .setup = ScoreTqReqSurrenderMrsp_Setup_Wrap, + .stop = NULL, + .teardown = ScoreTqReqSurrenderMrsp_Teardown_Wrap, + .scope = ScoreTqReqSurrenderMrsp_Scope, + .initial_context = &ScoreTqReqSurrenderMrsp_Instance +}; + +static inline ScoreTqReqSurrenderMrsp_Entry ScoreTqReqSurrenderMrsp_PopEntry( + ScoreTqReqSurrenderMrsp_Context *ctx +) +{ + size_t index; + + index = ctx->Map.index; + ctx->Map.index = index + 1; + return ScoreTqReqSurrenderMrsp_Entries[ + ScoreTqReqSurrenderMrsp_Map[ index ] + ]; +} + +static void ScoreTqReqSurrenderMrsp_TestVariant( + ScoreTqReqSurrenderMrsp_Context *ctx +) +{ + ScoreTqReqSurrenderMrsp_Pre_InheritedPriority_Prepare( + ctx, + ctx->Map.pcs[ 0 ] + ); + ScoreTqReqSurrenderMrsp_Pre_PreviousHelping_Prepare( + ctx, + ctx->Map.pcs[ 1 ] + ); + ScoreTqReqSurrenderMrsp_Pre_Scheduler_Prepare( ctx, ctx->Map.pcs[ 2 ] ); + ScoreTqReqSurrenderMrsp_Pre_NewHelping_Prepare( ctx, ctx->Map.pcs[ 3 ] ); + ScoreTqReqSurrenderMrsp_Pre_Suspended_Prepare( ctx, ctx->Map.pcs[ 4 ] ); + ScoreTqReqSurrenderMrsp_Pre_WaitState_Prepare( ctx, ctx->Map.pcs[ 5 ] ); + ScoreTqReqSurrenderMrsp_Action( ctx ); + ScoreTqReqSurrenderMrsp_Post_Dequeue_Check( + ctx, + ctx->Map.entry.Post_Dequeue + ); + ScoreTqReqSurrenderMrsp_Post_Unblock_Check( + ctx, + ctx->Map.entry.Post_Unblock + ); + ScoreTqReqSurrenderMrsp_Post_PreviousOwnerPriority_Check( + ctx, + ctx->Map.entry.Post_PreviousOwnerPriority + ); + ScoreTqReqSurrenderMrsp_Post_RemoveHelper_Check( + ctx, + ctx->Map.entry.Post_RemoveHelper + ); + ScoreTqReqSurrenderMrsp_Post_AddHelper_Check( + ctx, + ctx->Map.entry.Post_AddHelper + ); + ScoreTqReqSurrenderMrsp_Post_Suspended_Check( + ctx, + ctx->Map.entry.Post_Suspended + ); +} + +static T_fixture_node ScoreTqReqSurrenderMrsp_Node; + +void ScoreTqReqSurrenderMrsp_Run( TQContext *tq_ctx ) +{ + ScoreTqReqSurrenderMrsp_Context *ctx; + + ctx = &ScoreTqReqSurrenderMrsp_Instance; + ctx->tq_ctx = tq_ctx; + + ctx = T_push_fixture( + &ScoreTqReqSurrenderMrsp_Node, + &ScoreTqReqSurrenderMrsp_Fixture + ); + ctx->Map.in_action_loop = true; + ctx->Map.index = 0; + + for ( + ctx->Map.pcs[ 0 ] = ScoreTqReqSurrenderMrsp_Pre_InheritedPriority_Vital; + ctx->Map.pcs[ 0 ] < ScoreTqReqSurrenderMrsp_Pre_InheritedPriority_NA; + ++ctx->Map.pcs[ 0 ] + ) { + for ( + ctx->Map.pcs[ 1 ] = ScoreTqReqSurrenderMrsp_Pre_PreviousHelping_Vital; + ctx->Map.pcs[ 1 ] < ScoreTqReqSurrenderMrsp_Pre_PreviousHelping_NA; + ++ctx->Map.pcs[ 1 ] + ) { + for ( + ctx->Map.pcs[ 2 ] = ScoreTqReqSurrenderMrsp_Pre_Scheduler_Home; + ctx->Map.pcs[ 2 ] < ScoreTqReqSurrenderMrsp_Pre_Scheduler_NA; + ++ctx->Map.pcs[ 2 ] + ) { + for ( + ctx->Map.pcs[ 3 ] = ScoreTqReqSurrenderMrsp_Pre_NewHelping_Vital; + ctx->Map.pcs[ 3 ] < ScoreTqReqSurrenderMrsp_Pre_NewHelping_NA; + ++ctx->Map.pcs[ 3 ] + ) { + for ( + ctx->Map.pcs[ 4 ] = ScoreTqReqSurrenderMrsp_Pre_Suspended_Yes; + ctx->Map.pcs[ 4 ] < ScoreTqReqSurrenderMrsp_Pre_Suspended_NA; + ++ctx->Map.pcs[ 4 ] + ) { + for ( + ctx->Map.pcs[ 5 ] = ScoreTqReqSurrenderMrsp_Pre_WaitState_IntendToBlock; + ctx->Map.pcs[ 5 ] < ScoreTqReqSurrenderMrsp_Pre_WaitState_NA; + ++ctx->Map.pcs[ 5 ] + ) { + ctx->Map.entry = ScoreTqReqSurrenderMrsp_PopEntry( ctx ); + ScoreTqReqSurrenderMrsp_Prepare( ctx ); + ScoreTqReqSurrenderMrsp_TestVariant( ctx ); + ScoreTqReqSurrenderMrsp_Cleanup( ctx ); + } + } + } + } + } + } + + T_pop_fixture(); +} + +/** @} */ diff --git a/testsuites/validation/tr-tq-surrender-mrsp.h b/testsuites/validation/tr-tq-surrender-mrsp.h new file mode 100644 index 0000000000..66be73adbb --- /dev/null +++ b/testsuites/validation/tr-tq-surrender-mrsp.h @@ -0,0 +1,148 @@ +/* SPDX-License-Identifier: BSD-2-Clause */ + +/** + * @file + * + * @ingroup RTEMSTestCaseScoreTqReqSurrenderMrsp + */ + +/* + * Copyright (C) 2021 embedded brains GmbH (http://www.embedded-brains.de) + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" + * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE + * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF + * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS + * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN + * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGE. + */ + +/* + * This file is part of the RTEMS quality process and was automatically + * generated. If you find something that needs to be fixed or + * worded better please post a report or patch to an RTEMS mailing list + * or raise a bug report: + * + * https://www.rtems.org/bugs.html + * + * For information on updating and regenerating please refer to the How-To + * section in the Software Requirements Engineering chapter of the + * RTEMS Software Engineering manual. The manual is provided as a part of + * a release. For development sources please refer to the online + * documentation at: + * + * https://docs.rtems.org + */ + +#ifndef _TR_TQ_SURRENDER_MRSP_H +#define _TR_TQ_SURRENDER_MRSP_H + +#include "tx-thread-queue.h" + +#ifdef __cplusplus +extern "C" { +#endif + +/** + * @addtogroup RTEMSTestCaseScoreTqReqSurrenderMrsp + * + * @{ + */ + +typedef enum { + ScoreTqReqSurrenderMrsp_Pre_InheritedPriority_Vital, + ScoreTqReqSurrenderMrsp_Pre_InheritedPriority_Dispensable, + ScoreTqReqSurrenderMrsp_Pre_InheritedPriority_NA +} ScoreTqReqSurrenderMrsp_Pre_InheritedPriority; + +typedef enum { + ScoreTqReqSurrenderMrsp_Pre_PreviousHelping_Vital, + ScoreTqReqSurrenderMrsp_Pre_PreviousHelping_Dispensable, + ScoreTqReqSurrenderMrsp_Pre_PreviousHelping_NA +} ScoreTqReqSurrenderMrsp_Pre_PreviousHelping; + +typedef enum { + ScoreTqReqSurrenderMrsp_Pre_Scheduler_Home, + ScoreTqReqSurrenderMrsp_Pre_Scheduler_Helping, + ScoreTqReqSurrenderMrsp_Pre_Scheduler_NA +} ScoreTqReqSurrenderMrsp_Pre_Scheduler; + +typedef enum { + ScoreTqReqSurrenderMrsp_Pre_NewHelping_Vital, + ScoreTqReqSurrenderMrsp_Pre_NewHelping_Dispensable, + ScoreTqReqSurrenderMrsp_Pre_NewHelping_NA +} ScoreTqReqSurrenderMrsp_Pre_NewHelping; + +typedef enum { + ScoreTqReqSurrenderMrsp_Pre_Suspended_Yes, + ScoreTqReqSurrenderMrsp_Pre_Suspended_No, + ScoreTqReqSurrenderMrsp_Pre_Suspended_NA +} ScoreTqReqSurrenderMrsp_Pre_Suspended; + +typedef enum { + ScoreTqReqSurrenderMrsp_Pre_WaitState_IntendToBlock, + ScoreTqReqSurrenderMrsp_Pre_WaitState_NA +} ScoreTqReqSurrenderMrsp_Pre_WaitState; + +typedef enum { + ScoreTqReqSurrenderMrsp_Post_Dequeue_Priority, + ScoreTqReqSurrenderMrsp_Post_Dequeue_NA +} ScoreTqReqSurrenderMrsp_Post_Dequeue; + +typedef enum { + ScoreTqReqSurrenderMrsp_Post_Unblock_No, + ScoreTqReqSurrenderMrsp_Post_Unblock_NA +} ScoreTqReqSurrenderMrsp_Post_Unblock; + +typedef enum { + ScoreTqReqSurrenderMrsp_Post_PreviousOwnerPriority_Drop, + ScoreTqReqSurrenderMrsp_Post_PreviousOwnerPriority_Nop, + ScoreTqReqSurrenderMrsp_Post_PreviousOwnerPriority_NA +} ScoreTqReqSurrenderMrsp_Post_PreviousOwnerPriority; + +typedef enum { + ScoreTqReqSurrenderMrsp_Post_RemoveHelper_Yes, + ScoreTqReqSurrenderMrsp_Post_RemoveHelper_No, + ScoreTqReqSurrenderMrsp_Post_RemoveHelper_NA +} ScoreTqReqSurrenderMrsp_Post_RemoveHelper; + +typedef enum { + ScoreTqReqSurrenderMrsp_Post_AddHelper_Yes, + ScoreTqReqSurrenderMrsp_Post_AddHelper_No, + ScoreTqReqSurrenderMrsp_Post_AddHelper_NA +} ScoreTqReqSurrenderMrsp_Post_AddHelper; + +typedef enum { + ScoreTqReqSurrenderMrsp_Post_Suspended_Yes, + ScoreTqReqSurrenderMrsp_Post_Suspended_No, + ScoreTqReqSurrenderMrsp_Post_Suspended_NA +} ScoreTqReqSurrenderMrsp_Post_Suspended; + +/** + * @brief Runs the parameterized test case. + * + * @param[in,out] tq_ctx is the thread queue test context. + */ +void ScoreTqReqSurrenderMrsp_Run( TQContext *tq_ctx ); + +/** @} */ + +#ifdef __cplusplus +} +#endif + +#endif /* _TR_TQ_SURRENDER_MRSP_H */ diff --git a/testsuites/validation/tr-tq-surrender-priority-inherit.c b/testsuites/validation/tr-tq-surrender-priority-inherit.c index 69ba973762..1e9f2865b5 100644 --- a/testsuites/validation/tr-tq-surrender-priority-inherit.c +++ b/testsuites/validation/tr-tq-surrender-priority-inherit.c @@ -72,16 +72,18 @@ typedef struct { uint32_t Skip : 1; - uint32_t Pre_EnqueueVariant_NA : 1; + uint32_t Pre_SchedulerCount_NA : 1; uint32_t Pre_InheritedPriority_NA : 1; uint32_t Pre_PreviousHelping_NA : 1; - uint32_t Pre_Scheduler_NA : 1; + uint32_t Pre_UsedScheduler_NA : 1; + uint32_t Pre_NewPriority_NA : 1; uint32_t Pre_NewHelping_NA : 1; uint32_t Pre_Suspended_NA : 1; uint32_t Pre_WaitState_NA : 1; uint32_t Post_Dequeue : 1; uint32_t Post_Unblock : 2; uint32_t Post_PreviousOwnerPriority : 2; + uint32_t Post_NewPriority : 2; uint32_t Post_RemoveHelper : 2; uint32_t Post_AddHelper : 2; uint32_t Post_Suspended : 2; @@ -123,6 +125,12 @@ typedef struct { /** * @brief If this member is true, then the new owner thread shall gain a + * vital priority. + */ + bool gains_new_priority; + + /** + * @brief If this member is true, then the new owner thread shall gain a * vital helping scheduler. */ bool gains_new_helping_scheduler; @@ -171,7 +179,7 @@ typedef struct { /** * @brief This member defines the pre-condition states for the next action. */ - size_t pcs[ 7 ]; + size_t pcs[ 8 ]; /** * @brief If this member is true, then the test action loop is executed. @@ -199,9 +207,10 @@ typedef struct { static ScoreTqReqSurrenderPriorityInherit_Context ScoreTqReqSurrenderPriorityInherit_Instance; -static const char * const ScoreTqReqSurrenderPriorityInherit_PreDesc_EnqueueVariant[] = { - "Blocking", - "Sticky", +static const char * const ScoreTqReqSurrenderPriorityInherit_PreDesc_SchedulerCount[] = { + "One", + "Two", + "More", "NA" }; @@ -217,12 +226,18 @@ static const char * const ScoreTqReqSurrenderPriorityInherit_PreDesc_PreviousHel "NA" }; -static const char * const ScoreTqReqSurrenderPriorityInherit_PreDesc_Scheduler[] = { +static const char * const ScoreTqReqSurrenderPriorityInherit_PreDesc_UsedScheduler[] = { "Home", "Helping", "NA" }; +static const char * const ScoreTqReqSurrenderPriorityInherit_PreDesc_NewPriority[] = { + "Vital", + "Dispensable", + "NA" +}; + static const char * const ScoreTqReqSurrenderPriorityInherit_PreDesc_NewHelping[] = { "Vital", "Dispensable", @@ -242,10 +257,11 @@ static const char * const ScoreTqReqSurrenderPriorityInherit_PreDesc_WaitState[] }; static const char * const * const ScoreTqReqSurrenderPriorityInherit_PreDesc[] = { - ScoreTqReqSurrenderPriorityInherit_PreDesc_EnqueueVariant, + ScoreTqReqSurrenderPriorityInherit_PreDesc_SchedulerCount, ScoreTqReqSurrenderPriorityInherit_PreDesc_InheritedPriority, ScoreTqReqSurrenderPriorityInherit_PreDesc_PreviousHelping, - ScoreTqReqSurrenderPriorityInherit_PreDesc_Scheduler, + ScoreTqReqSurrenderPriorityInherit_PreDesc_UsedScheduler, + ScoreTqReqSurrenderPriorityInherit_PreDesc_NewPriority, ScoreTqReqSurrenderPriorityInherit_PreDesc_NewHelping, ScoreTqReqSurrenderPriorityInherit_PreDesc_Suspended, ScoreTqReqSurrenderPriorityInherit_PreDesc_WaitState, @@ -254,6 +270,24 @@ static const char * const * const ScoreTqReqSurrenderPriorityInherit_PreDesc[] = typedef ScoreTqReqSurrenderPriorityInherit_Context Context; +#define NEW_OWNER TQ_BLOCKER_A + +#define PREV_OWNER_HELPER_A TQ_BLOCKER_B + +#define PREV_OWNER_HELPER_B TQ_BLOCKER_C + +#define PREV_OWNER_HELPER_C TQ_BLOCKER_D + +#define NEW_OWNER_NEW_HELPER TQ_BLOCKER_E + +#define NEW_OWNER_NEW_PRIORITY TQ_WORKER_F + +#define NEW_OWNER_OLD_PRIORITY TQ_HELPER_C + +#define PREV_OWNER_MOVER TQ_HELPER_A + +#define PREV_OWNER TQ_HELPER_A + static const rtems_tcb *GetUnblock( Context *ctx, size_t *index ) { return TQGetNextUnblock( ctx->tq_ctx, index )->thread; @@ -269,7 +303,7 @@ static void Surrender( Context *ctx ) Status_Control status; if ( ctx->suspended ) { - SuspendTask( ctx->tq_ctx->worker_id[ TQ_BLOCKER_A ] ); + SuspendTask( ctx->tq_ctx->worker_id[ NEW_OWNER ] ); } ctx->priority_before = GetSelfPriority(); @@ -277,7 +311,7 @@ static void Surrender( Context *ctx ) status = TQSurrender( ctx->tq_ctx ); T_eq_int( status, TQConvertStatus( ctx->tq_ctx, STATUS_SUCCESSFUL ) ); TQSchedulerRecordStop( ctx->tq_ctx ); - T_eq_ptr( TQGetOwner( ctx->tq_ctx ), ctx->tq_ctx->worker_tcb[ TQ_BLOCKER_A ] ); + T_eq_ptr( TQGetOwner( ctx->tq_ctx ), ctx->tq_ctx->worker_tcb[ NEW_OWNER ] ); ctx->priority_after = GetSelfPriority(); } @@ -321,17 +355,33 @@ static void SchedulerBlock( static void Setup( Context *ctx ) { #if defined(RTEMS_SMP) - TQSetScheduler( ctx->tq_ctx, TQ_BLOCKER_A, SCHEDULER_B_ID, PRIO_NORMAL ); - TQSetPriority( ctx->tq_ctx, TQ_BLOCKER_B, PRIO_VERY_HIGH ); - TQSetScheduler( ctx->tq_ctx, TQ_BLOCKER_C, SCHEDULER_B_ID, PRIO_HIGH ); - TQSetPriority( ctx->tq_ctx, TQ_BLOCKER_D, PRIO_LOW ); - TQSetPriority( ctx->tq_ctx, TQ_HELPER_A, PRIO_ULTRA_HIGH ); + TQSetScheduler( ctx->tq_ctx, NEW_OWNER, SCHEDULER_B_ID, PRIO_NORMAL ); + TQSetPriority( ctx->tq_ctx, PREV_OWNER_HELPER_A, PRIO_VERY_HIGH ); + TQSetScheduler( + ctx->tq_ctx, + PREV_OWNER_HELPER_B, + SCHEDULER_B_ID, + PRIO_HIGH + ); + TQSetPriority( ctx->tq_ctx, NEW_OWNER_OLD_PRIORITY, PRIO_VERY_LOW ); + TQSetPriority( ctx->tq_ctx, NEW_OWNER_NEW_PRIORITY, PRIO_LOW ); + + TQSetPriority( ctx->tq_ctx, PREV_OWNER_MOVER, PRIO_ULTRA_HIGH ); + + if ( rtems_scheduler_get_processor_maximum() >= 3 ) { + TQSetScheduler( + ctx->tq_ctx, + PREV_OWNER_HELPER_C, + SCHEDULER_C_ID, + PRIO_HIGH + ); + } #else - TQSetPriority( ctx->tq_ctx, TQ_BLOCKER_A, PRIO_HIGH ); - TQSetPriority( ctx->tq_ctx, TQ_BLOCKER_B, PRIO_HIGH ); + TQSetPriority( ctx->tq_ctx, NEW_OWNER, PRIO_HIGH ); + TQSetPriority( ctx->tq_ctx, PREV_OWNER_HELPER_A, PRIO_HIGH ); #endif - TQSetPriority( ctx->tq_ctx, TQ_HELPER_B, PRIO_VERY_LOW ); + TQSetPriority( ctx->tq_ctx, TQ_HELPER_B, PRIO_ULTRA_LOW ); } static void Action( Context *ctx ) @@ -343,29 +393,40 @@ static void Action( Context *ctx ) ctx->action_performed = true; ctx->previous_owner = ctx->tq_ctx->runner_id; - - if ( - ctx->inherited_priorities_are_dispensible + TQMutexObtain( ctx->tq_ctx, TQ_MUTEX_A ); #if defined(RTEMS_SMP) - || ctx->helping_schedules_are_dispensible + TQSendAndWaitForExecutionStop( + ctx->tq_ctx, + NEW_OWNER, + TQ_EVENT_MUTEX_B_OBTAIN + ); #endif - ) { - TQMutexObtain( ctx->tq_ctx, TQ_MUTEX_A ); - if ( ctx->inherited_priorities_are_dispensible ) { - TQSend( ctx->tq_ctx, TQ_BLOCKER_B, TQ_EVENT_MUTEX_A_OBTAIN ); - } + if ( ctx->inherited_priorities_are_dispensible ) { + TQSend( + ctx->tq_ctx, + PREV_OWNER_HELPER_A, + TQ_EVENT_MUTEX_A_OBTAIN | TQ_EVENT_MUTEX_A_RELEASE + ); + } #if defined(RTEMS_SMP) - if ( ctx->helping_schedules_are_dispensible ) { + if ( ctx->helping_schedules_are_dispensible ) { + TQSendAndWaitForExecutionStop( + ctx->tq_ctx, + PREV_OWNER_HELPER_B, + TQ_EVENT_MUTEX_A_OBTAIN | TQ_EVENT_MUTEX_A_RELEASE + ); + + if ( ctx->gains_new_priority && ctx->gains_new_helping_scheduler ) { TQSendAndWaitForExecutionStop( ctx->tq_ctx, - TQ_BLOCKER_C, - TQ_EVENT_MUTEX_A_OBTAIN + PREV_OWNER_HELPER_C, + TQ_EVENT_MUTEX_A_OBTAIN | TQ_EVENT_MUTEX_A_RELEASE ); } -#endif } +#endif status = TQEnqueue( ctx->tq_ctx, TQ_NO_WAIT ); T_eq_int( status, TQConvertStatus( ctx->tq_ctx, STATUS_SUCCESSFUL ) ); @@ -376,23 +437,56 @@ static void Action( Context *ctx ) _SMP_barrier_State_initialize( &state ); T_scheduler_set_event_handler( SchedulerBlock, ctx ); - TQSend( ctx->tq_ctx, TQ_BLOCKER_A, TQ_EVENT_ENQUEUE ); + TQSend( ctx->tq_ctx, NEW_OWNER, TQ_EVENT_ENQUEUE ); /* B0 */ _SMP_barrier_Wait( &ctx->barrier, &state, 2 ); } else { TQSendAndWaitForExecutionStop( ctx->tq_ctx, - TQ_BLOCKER_A, + NEW_OWNER, TQ_EVENT_ENQUEUE ); } - if ( ctx->gains_new_helping_scheduler ) { + if ( ctx->gains_new_priority ) { + TQSend( + ctx->tq_ctx, + NEW_OWNER_OLD_PRIORITY, + TQ_EVENT_HELPER_B_SYNC | TQ_EVENT_MUTEX_B_OBTAIN + ); + TQSynchronizeRunner(); + TQSend( + ctx->tq_ctx, + NEW_OWNER_NEW_PRIORITY, + TQ_EVENT_HELPER_B_SYNC | TQ_EVENT_ENQUEUE + ); + TQSynchronizeRunner(); + + if ( ctx->gains_new_helping_scheduler ) { + TQSetScheduler( + ctx->tq_ctx, + NEW_OWNER_NEW_HELPER, + SCHEDULER_C_ID, + PRIO_LOW + ); + TQSendAndWaitForExecutionStop( + ctx->tq_ctx, + NEW_OWNER_NEW_HELPER, + TQ_EVENT_ENQUEUE + ); + } + } else if ( ctx->gains_new_helping_scheduler ) { + TQSetScheduler( + ctx->tq_ctx, + NEW_OWNER_NEW_HELPER, + SCHEDULER_A_ID, + PRIO_LOW + ); TQSend( ctx->tq_ctx, - TQ_BLOCKER_D, - TQ_EVENT_ENQUEUE | TQ_EVENT_HELPER_B_SYNC + NEW_OWNER_NEW_HELPER, + TQ_EVENT_HELPER_B_SYNC | TQ_EVENT_ENQUEUE ); TQSynchronizeRunner(); } @@ -402,20 +496,20 @@ static void Action( Context *ctx ) * wait state, we would need at least three processors. Skip it for now. */ if ( ctx->use_helping_scheduler && !ctx->intend_to_block ) { - ctx->tq_ctx->busy_wait[ TQ_HELPER_A ] = true; - TQSend( ctx->tq_ctx, TQ_HELPER_A, TQ_EVENT_BUSY_WAIT ); + ctx->tq_ctx->busy_wait[ PREV_OWNER_MOVER ] = true; + TQSend( ctx->tq_ctx, PREV_OWNER_MOVER, TQ_EVENT_BUSY_WAIT ); while ( rtems_scheduler_get_processor() != 1 ) { /* Wait */ } - ctx->tq_ctx->busy_wait[ TQ_HELPER_A ] = false; + ctx->tq_ctx->busy_wait[ PREV_OWNER_MOVER ] = false; } #else TQSend( ctx->tq_ctx, - TQ_BLOCKER_A, - TQ_EVENT_ENQUEUE | TQ_EVENT_HELPER_B_SYNC + NEW_OWNER, + TQ_EVENT_HELPER_B_SYNC | TQ_EVENT_ENQUEUE ); TQSynchronizeRunner(); #endif @@ -433,48 +527,48 @@ static void Action( Context *ctx ) static void Cleanup( Context *ctx ) { if ( ctx->suspended ) { - ResumeTask( ctx->tq_ctx->worker_id[ TQ_BLOCKER_A ] ); + ResumeTask( ctx->tq_ctx->worker_id[ NEW_OWNER ] ); } TQSendAndSynchronizeRunner( ctx->tq_ctx, - TQ_BLOCKER_A, + NEW_OWNER, TQ_EVENT_SURRENDER ); - TQWaitForExecutionStop( ctx->tq_ctx, TQ_BLOCKER_A ); + TQWaitForExecutionStop( ctx->tq_ctx, NEW_OWNER ); #if defined(RTEMS_SMP) - if ( ctx->gains_new_helping_scheduler ) { + TQSendAndWaitForExecutionStop( + ctx->tq_ctx, + NEW_OWNER, + TQ_EVENT_MUTEX_B_RELEASE + ); + + if ( ctx->gains_new_priority ) { TQSendAndSynchronizeRunner( ctx->tq_ctx, - TQ_BLOCKER_D, + NEW_OWNER_OLD_PRIORITY, + TQ_EVENT_MUTEX_B_RELEASE + ); + TQSendAndSynchronizeRunner( + ctx->tq_ctx, + NEW_OWNER_NEW_PRIORITY, TQ_EVENT_SURRENDER ); } -#endif - if ( - ctx->inherited_priorities_are_dispensible -#if defined(RTEMS_SMP) - || ctx->helping_schedules_are_dispensible + if ( ctx->gains_new_helping_scheduler ) { + TQSendAndSynchronizeRunner( + ctx->tq_ctx, + NEW_OWNER_NEW_HELPER, + TQ_EVENT_SURRENDER + ); + } #endif - ) { - TQMutexRelease( ctx->tq_ctx, TQ_MUTEX_A ); - if ( ctx->inherited_priorities_are_dispensible ) { - TQSend( ctx->tq_ctx, TQ_BLOCKER_B, TQ_EVENT_MUTEX_A_RELEASE ); - } - -#if defined(RTEMS_SMP) - if ( ctx->helping_schedules_are_dispensible ) { - TQSendAndWaitForExecutionStop( - ctx->tq_ctx, - TQ_BLOCKER_C, - TQ_EVENT_MUTEX_A_RELEASE - ); - } -#endif - } + TQMutexRelease( ctx->tq_ctx, TQ_MUTEX_A ); + TQMutexObtain( ctx->tq_ctx, TQ_MUTEX_A ); + TQMutexRelease( ctx->tq_ctx, TQ_MUTEX_A ); T_eq_u32( rtems_scheduler_get_processor(), 0 ); } @@ -482,11 +576,15 @@ static void Cleanup( Context *ctx ) static void SetupSticky( Context *ctx ) { #if defined(RTEMS_SMP) - TQSetScheduler( ctx->tq_ctx, TQ_BLOCKER_A, SCHEDULER_B_ID, PRIO_NORMAL ); - TQSetPriority( ctx->tq_ctx, TQ_BLOCKER_B, PRIO_VERY_HIGH ); - TQSetScheduler( ctx->tq_ctx, TQ_BLOCKER_C, SCHEDULER_B_ID, PRIO_LOW ); - TQSetPriority( ctx->tq_ctx, TQ_BLOCKER_D, PRIO_VERY_HIGH ); - TQSetPriority( ctx->tq_ctx, TQ_HELPER_A, PRIO_NORMAL ); + TQSetScheduler( ctx->tq_ctx, NEW_OWNER, SCHEDULER_B_ID, PRIO_NORMAL ); + TQSetPriority( ctx->tq_ctx, PREV_OWNER_HELPER_A, PRIO_VERY_HIGH ); + TQSetScheduler( ctx->tq_ctx, + PREV_OWNER_HELPER_B, + SCHEDULER_B_ID, + PRIO_LOW + ); + TQSetPriority( ctx->tq_ctx, NEW_OWNER_NEW_HELPER, PRIO_VERY_HIGH ); + TQSetPriority( ctx->tq_ctx, PREV_OWNER, PRIO_NORMAL ); #endif } @@ -494,7 +592,7 @@ static void ActionSticky( Context *ctx ) { #if defined(RTEMS_SMP) ctx->action_performed = true; - ctx->previous_owner = ctx->tq_ctx->worker_id[ TQ_HELPER_A ]; + ctx->previous_owner = ctx->tq_ctx->worker_id[ PREV_OWNER ]; SetSelfPriority( PRIO_LOW ); @@ -502,16 +600,16 @@ static void ActionSticky( Context *ctx ) ctx->inherited_priorities_are_dispensible || ctx->helping_schedules_are_dispensible ) { - TQSend( ctx->tq_ctx, TQ_HELPER_A, TQ_EVENT_MUTEX_A_OBTAIN ); + TQSend( ctx->tq_ctx, PREV_OWNER, TQ_EVENT_MUTEX_A_OBTAIN ); if ( ctx->inherited_priorities_are_dispensible ) { - TQSend( ctx->tq_ctx, TQ_BLOCKER_B, TQ_EVENT_MUTEX_A_OBTAIN ); + TQSend( ctx->tq_ctx, PREV_OWNER_HELPER_A, TQ_EVENT_MUTEX_A_OBTAIN ); } if ( ctx->helping_schedules_are_dispensible ) { TQSendAndWaitForExecutionStop( ctx->tq_ctx, - TQ_BLOCKER_C, + PREV_OWNER_HELPER_B, TQ_EVENT_MUTEX_A_OBTAIN ); } @@ -522,20 +620,20 @@ static void ActionSticky( Context *ctx ) * priority inheritance mutex. This avoids having to deal with the ceiling * priority. */ - ctx->priority_before = TQGetPriority( ctx->tq_ctx, TQ_HELPER_A ); + ctx->priority_before = TQGetPriority( ctx->tq_ctx, PREV_OWNER ); SetSelfScheduler( SCHEDULER_B_ID, PRIO_ULTRA_HIGH ); - ctx->tq_ctx->busy_wait[ TQ_HELPER_A ] = true; + ctx->tq_ctx->busy_wait[ PREV_OWNER ] = true; TQSendAndSynchronizeRunner( ctx->tq_ctx, - TQ_HELPER_A, + PREV_OWNER, TQ_EVENT_ENQUEUE | TQ_EVENT_BUSY_WAIT ); SetSelfScheduler( SCHEDULER_A_ID, PRIO_ULTRA_HIGH ); TQSendAndWaitForIntendToBlock( ctx->tq_ctx, - TQ_BLOCKER_A, + NEW_OWNER, TQ_EVENT_ENQUEUE ); @@ -544,13 +642,13 @@ static void ActionSticky( Context *ctx ) if ( ctx->gains_new_helping_scheduler ) { TQSend( ctx->tq_ctx, - TQ_BLOCKER_D, + NEW_OWNER_NEW_HELPER, TQ_EVENT_ENQUEUE ); - YieldTask( ctx->tq_ctx->worker_id[ TQ_HELPER_A ] ); - TQWaitForEventsReceived( ctx->tq_ctx, TQ_BLOCKER_D ); - TQWaitForIntendToBlock( ctx->tq_ctx, TQ_BLOCKER_D ); - YieldTask( ctx->tq_ctx->worker_id[ TQ_BLOCKER_D ] ); + YieldTask( ctx->tq_ctx->worker_id[ PREV_OWNER ] ); + TQWaitForEventsReceived( ctx->tq_ctx, NEW_OWNER_NEW_HELPER ); + TQWaitForIntendToBlock( ctx->tq_ctx, NEW_OWNER_NEW_HELPER ); + YieldTask( ctx->tq_ctx->worker_id[ NEW_OWNER_NEW_HELPER ] ); } if ( ctx->use_helping_scheduler ) { @@ -558,22 +656,22 @@ static void ActionSticky( Context *ctx ) } if ( ctx->suspended ) { - SuspendTask( ctx->tq_ctx->worker_id[ TQ_BLOCKER_A ] ); + SuspendTask( ctx->tq_ctx->worker_id[ NEW_OWNER ] ); } - ctx->tq_ctx->busy_wait[ TQ_HELPER_A ] = false; + ctx->tq_ctx->busy_wait[ PREV_OWNER ] = false; TQSendAndWaitForExecutionStop( ctx->tq_ctx, - TQ_HELPER_A, + PREV_OWNER, TQ_EVENT_SCHEDULER_RECORD_START | TQ_EVENT_SURRENDER ); TQSchedulerRecordStop( ctx->tq_ctx ); T_eq_ptr( TQGetOwner( ctx->tq_ctx ), - ctx->tq_ctx->worker_tcb[ TQ_BLOCKER_A ] + ctx->tq_ctx->worker_tcb[ NEW_OWNER ] ); - ctx->priority_after = TQGetPriority( ctx->tq_ctx, TQ_HELPER_A ); + ctx->priority_after = TQGetPriority( ctx->tq_ctx, PREV_OWNER ); #endif } @@ -583,19 +681,19 @@ static void CleanupSticky( Context *ctx ) SetSelfScheduler( SCHEDULER_A_ID, PRIO_ULTRA_HIGH ); if ( ctx->suspended ) { - ResumeTask( ctx->tq_ctx->worker_id[ TQ_BLOCKER_A ] ); + ResumeTask( ctx->tq_ctx->worker_id[ NEW_OWNER ] ); } TQSendAndSynchronizeRunner( ctx->tq_ctx, - TQ_BLOCKER_A, + NEW_OWNER, TQ_EVENT_SURRENDER ); if ( ctx->gains_new_helping_scheduler ) { TQSendAndSynchronizeRunner( ctx->tq_ctx, - TQ_BLOCKER_D, + NEW_OWNER_NEW_HELPER, TQ_EVENT_SURRENDER ); } @@ -606,14 +704,14 @@ static void CleanupSticky( Context *ctx ) ) { TQSendAndSynchronizeRunner( ctx->tq_ctx, - TQ_HELPER_A, + PREV_OWNER, TQ_EVENT_MUTEX_A_RELEASE ); if ( ctx->inherited_priorities_are_dispensible ) { TQSendAndSynchronizeRunner( ctx->tq_ctx, - TQ_BLOCKER_B, + PREV_OWNER_HELPER_A, TQ_EVENT_MUTEX_A_RELEASE ); } @@ -621,7 +719,7 @@ static void CleanupSticky( Context *ctx ) if ( ctx->helping_schedules_are_dispensible ) { TQSendAndSynchronizeRunner( ctx->tq_ctx, - TQ_BLOCKER_C, + PREV_OWNER_HELPER_B, TQ_EVENT_MUTEX_A_RELEASE ); } @@ -631,33 +729,43 @@ static void CleanupSticky( Context *ctx ) #endif } -static void ScoreTqReqSurrenderPriorityInherit_Pre_EnqueueVariant_Prepare( +static void ScoreTqReqSurrenderPriorityInherit_Pre_SchedulerCount_Prepare( ScoreTqReqSurrenderPriorityInherit_Context *ctx, - ScoreTqReqSurrenderPriorityInherit_Pre_EnqueueVariant state + ScoreTqReqSurrenderPriorityInherit_Pre_SchedulerCount state ) { switch ( state ) { - case ScoreTqReqSurrenderPriorityInherit_Pre_EnqueueVariant_Blocking: { + case ScoreTqReqSurrenderPriorityInherit_Pre_SchedulerCount_One: { + /* + * Where the system has exactly one schedulers. + */ + if ( rtems_scheduler_get_processor_maximum() != 1 ) { + ctx->Map.skip = true; + } + break; + } + + case ScoreTqReqSurrenderPriorityInherit_Pre_SchedulerCount_Two: { /* - * Where the thread queue enqueue operation is blocking. + * Where the system has exactly two schedulers. */ - if ( ctx->tq_ctx->enqueue_variant != TQ_ENQUEUE_BLOCKS ) { + if ( rtems_scheduler_get_processor_maximum() != 2 ) { ctx->Map.skip = true; } break; } - case ScoreTqReqSurrenderPriorityInherit_Pre_EnqueueVariant_Sticky: { + case ScoreTqReqSurrenderPriorityInherit_Pre_SchedulerCount_More: { /* - * Where the thread queue enqueue operation is sticky. + * Where the system has at least three schedulers. */ - if ( ctx->tq_ctx->enqueue_variant != TQ_ENQUEUE_STICKY ) { + if ( rtems_scheduler_get_processor_maximum() < 3 ) { ctx->Map.skip = true; } break; } - case ScoreTqReqSurrenderPriorityInherit_Pre_EnqueueVariant_NA: + case ScoreTqReqSurrenderPriorityInherit_Pre_SchedulerCount_NA: break; } } @@ -720,13 +828,13 @@ static void ScoreTqReqSurrenderPriorityInherit_Pre_PreviousHelping_Prepare( } } -static void ScoreTqReqSurrenderPriorityInherit_Pre_Scheduler_Prepare( - ScoreTqReqSurrenderPriorityInherit_Context *ctx, - ScoreTqReqSurrenderPriorityInherit_Pre_Scheduler state +static void ScoreTqReqSurrenderPriorityInherit_Pre_UsedScheduler_Prepare( + ScoreTqReqSurrenderPriorityInherit_Context *ctx, + ScoreTqReqSurrenderPriorityInherit_Pre_UsedScheduler state ) { switch ( state ) { - case ScoreTqReqSurrenderPriorityInherit_Pre_Scheduler_Home: { + case ScoreTqReqSurrenderPriorityInherit_Pre_UsedScheduler_Home: { /* * While the previous owner executes in its home scheduler. */ @@ -734,7 +842,7 @@ static void ScoreTqReqSurrenderPriorityInherit_Pre_Scheduler_Prepare( break; } - case ScoreTqReqSurrenderPriorityInherit_Pre_Scheduler_Helping: { + case ScoreTqReqSurrenderPriorityInherit_Pre_UsedScheduler_Helping: { /* * While the previous owner executes in a helping scheduler which is * available due to a priority inherited through the thread queue. @@ -743,7 +851,36 @@ static void ScoreTqReqSurrenderPriorityInherit_Pre_Scheduler_Prepare( break; } - case ScoreTqReqSurrenderPriorityInherit_Pre_Scheduler_NA: + case ScoreTqReqSurrenderPriorityInherit_Pre_UsedScheduler_NA: + break; + } +} + +static void ScoreTqReqSurrenderPriorityInherit_Pre_NewPriority_Prepare( + ScoreTqReqSurrenderPriorityInherit_Context *ctx, + ScoreTqReqSurrenderPriorityInherit_Pre_NewPriority state +) +{ + switch ( state ) { + case ScoreTqReqSurrenderPriorityInherit_Pre_NewPriority_Vital: { + /* + * While at least one highest priority of the new owner is only available + * due to a priority inherited through the thread queue. + */ + ctx->gains_new_priority = true; + break; + } + + case ScoreTqReqSurrenderPriorityInherit_Pre_NewPriority_Dispensable: { + /* + * While all highest priorities of the new owner are not only available + * due to a priority inherited through the thread queue. + */ + ctx->gains_new_priority = false; + break; + } + + case ScoreTqReqSurrenderPriorityInherit_Pre_NewPriority_NA: break; } } @@ -866,7 +1003,7 @@ static void ScoreTqReqSurrenderPriorityInherit_Post_Unblock_Check( * The dequeued thread shall be unblocked by the thread queue surrender * operation. */ - T_eq_ptr( GetUnblock( ctx, &i ), GetTCB( ctx, TQ_BLOCKER_A ) ); + T_eq_ptr( GetUnblock( ctx, &i ), GetTCB( ctx, NEW_OWNER ) ); T_eq_ptr( GetUnblock( ctx, &i ), NULL ); break; } @@ -914,13 +1051,67 @@ ScoreTqReqSurrenderPriorityInherit_Post_PreviousOwnerPriority_Check( } } +static void ScoreTqReqSurrenderPriorityInherit_Post_NewPriority_Check( + ScoreTqReqSurrenderPriorityInherit_Context *ctx, + ScoreTqReqSurrenderPriorityInherit_Post_NewPriority state +) +{ + rtems_id scheduler_id; + rtems_task_priority priority; + rtems_status_code sc; + + switch ( state ) { + case ScoreTqReqSurrenderPriorityInherit_Post_NewPriority_Raise: { + /* + * Each eligible priority of the new owner which inherited the highest + * priority through the thread queue shall be updated. + */ + sc = rtems_task_get_priority( + ctx->tq_ctx->worker_id[ NEW_OWNER ], + SCHEDULER_A_ID, + &priority + ); + T_rsc_success( sc ); + T_eq_u32( priority, PRIO_LOW ); + break; + } + + case ScoreTqReqSurrenderPriorityInherit_Post_NewPriority_Nop: { + /* + * No highest priority of the new owner shall be changed. + */ + if ( ctx->gains_new_helping_scheduler ) { + scheduler_id = SCHEDULER_C_ID; + } else { + scheduler_id = SCHEDULER_A_ID; + } + + sc = rtems_task_get_priority( + ctx->tq_ctx->worker_id[ NEW_OWNER ], + scheduler_id, + &priority + ); + #if defined(RTEMS_SMP) + T_rsc( sc, RTEMS_NOT_DEFINED ); + #else + T_rsc_success( sc ); + T_eq_u32( priority, PRIO_HIGH ); + #endif + break; + } + + case ScoreTqReqSurrenderPriorityInherit_Post_NewPriority_NA: + break; + } +} + static void ScoreTqReqSurrenderPriorityInherit_Post_RemoveHelper_Check( ScoreTqReqSurrenderPriorityInherit_Context *ctx, ScoreTqReqSurrenderPriorityInherit_Post_RemoveHelper state ) { - rtems_status_code sc; rtems_task_priority priority; + rtems_status_code sc; switch ( state ) { case ScoreTqReqSurrenderPriorityInherit_Post_RemoveHelper_Yes: { @@ -971,8 +1162,9 @@ static void ScoreTqReqSurrenderPriorityInherit_Post_AddHelper_Check( ScoreTqReqSurrenderPriorityInherit_Post_AddHelper state ) { - rtems_status_code sc; + rtems_id scheduler_id; rtems_task_priority priority; + rtems_status_code sc; switch ( state ) { case ScoreTqReqSurrenderPriorityInherit_Post_AddHelper_Yes: { @@ -981,9 +1173,15 @@ static void ScoreTqReqSurrenderPriorityInherit_Post_AddHelper_Check( * a priority inherited through the thread queue shall be added to the * new owner. */ + if ( ctx->gains_new_priority ) { + scheduler_id = SCHEDULER_C_ID; + } else { + scheduler_id = SCHEDULER_A_ID; + } + sc = rtems_task_get_priority( - ctx->tq_ctx->worker_id[ TQ_BLOCKER_A ], - SCHEDULER_A_ID, + ctx->tq_ctx->worker_id[ NEW_OWNER ], + scheduler_id, &priority ); T_rsc_success( sc ); @@ -1000,9 +1198,15 @@ static void ScoreTqReqSurrenderPriorityInherit_Post_AddHelper_Check( /* * No helping scheduler shall added to the new owner. */ + if ( ctx->gains_new_priority ) { + scheduler_id = SCHEDULER_C_ID; + } else { + scheduler_id = SCHEDULER_A_ID; + } + sc = rtems_task_get_priority( - ctx->tq_ctx->worker_id[ TQ_BLOCKER_A ], - SCHEDULER_A_ID, + ctx->tq_ctx->worker_id[ NEW_OWNER ], + scheduler_id, &priority ); #if defined(RTEMS_SMP) @@ -1029,7 +1233,7 @@ static void ScoreTqReqSurrenderPriorityInherit_Post_Suspended_Check( /* * The new owner shall be suspended. */ - T_true( IsTaskSuspended( ctx->tq_ctx->worker_id[ TQ_BLOCKER_A ] ) ); + T_true( IsTaskSuspended( ctx->tq_ctx->worker_id[ NEW_OWNER ] ) ); break; } @@ -1037,7 +1241,7 @@ static void ScoreTqReqSurrenderPriorityInherit_Post_Suspended_Check( /* * The new owner shall be not suspended. */ - T_false( IsTaskSuspended( ctx->tq_ctx->worker_id[ TQ_BLOCKER_A ] ) ); + T_false( IsTaskSuspended( ctx->tq_ctx->worker_id[ NEW_OWNER ] ) ); break; } @@ -1093,6 +1297,7 @@ static void ScoreTqReqSurrenderPriorityInherit_Prepare( ctx->inherited_priorities_are_dispensible = true; ctx->helping_schedules_are_dispensible = true; ctx->use_helping_scheduler = false; + ctx->gains_new_priority = false; ctx->gains_new_helping_scheduler = false; ctx->intend_to_block = false; } @@ -1123,449 +1328,946 @@ static void ScoreTqReqSurrenderPriorityInherit_Cleanup( static const ScoreTqReqSurrenderPriorityInherit_Entry ScoreTqReqSurrenderPriorityInherit_Entries[] = { + { 1, 0, 0, 0, 0, 0, 0, 0, 0, + ScoreTqReqSurrenderPriorityInherit_Post_Dequeue_NA, + ScoreTqReqSurrenderPriorityInherit_Post_Unblock_NA, + ScoreTqReqSurrenderPriorityInherit_Post_PreviousOwnerPriority_NA, + ScoreTqReqSurrenderPriorityInherit_Post_NewPriority_NA, + ScoreTqReqSurrenderPriorityInherit_Post_RemoveHelper_NA, + ScoreTqReqSurrenderPriorityInherit_Post_AddHelper_NA, + ScoreTqReqSurrenderPriorityInherit_Post_Suspended_NA }, #if !defined(RTEMS_SMP) - { 1, 0, 0, 0, 0, 0, 0, 0, ScoreTqReqSurrenderPriorityInherit_Post_Dequeue_NA, + { 1, 0, 0, 0, 0, 0, 0, 0, 0, + ScoreTqReqSurrenderPriorityInherit_Post_Dequeue_NA, ScoreTqReqSurrenderPriorityInherit_Post_Unblock_NA, ScoreTqReqSurrenderPriorityInherit_Post_PreviousOwnerPriority_NA, + ScoreTqReqSurrenderPriorityInherit_Post_NewPriority_NA, ScoreTqReqSurrenderPriorityInherit_Post_RemoveHelper_NA, ScoreTqReqSurrenderPriorityInherit_Post_AddHelper_NA, ScoreTqReqSurrenderPriorityInherit_Post_Suspended_NA }, #else - { 1, 0, 0, 0, 0, 0, 0, 0, ScoreTqReqSurrenderPriorityInherit_Post_Dequeue_NA, + { 1, 0, 0, 0, 0, 0, 0, 0, 0, + ScoreTqReqSurrenderPriorityInherit_Post_Dequeue_NA, ScoreTqReqSurrenderPriorityInherit_Post_Unblock_NA, ScoreTqReqSurrenderPriorityInherit_Post_PreviousOwnerPriority_NA, + ScoreTqReqSurrenderPriorityInherit_Post_NewPriority_NA, ScoreTqReqSurrenderPriorityInherit_Post_RemoveHelper_NA, ScoreTqReqSurrenderPriorityInherit_Post_AddHelper_NA, ScoreTqReqSurrenderPriorityInherit_Post_Suspended_NA }, #endif + { 1, 0, 0, 0, 0, 0, 0, 0, 0, + ScoreTqReqSurrenderPriorityInherit_Post_Dequeue_NA, + ScoreTqReqSurrenderPriorityInherit_Post_Unblock_NA, + ScoreTqReqSurrenderPriorityInherit_Post_PreviousOwnerPriority_NA, + ScoreTqReqSurrenderPriorityInherit_Post_NewPriority_NA, + ScoreTqReqSurrenderPriorityInherit_Post_RemoveHelper_NA, + ScoreTqReqSurrenderPriorityInherit_Post_AddHelper_NA, + ScoreTqReqSurrenderPriorityInherit_Post_Suspended_NA }, #if !defined(RTEMS_SMP) - { 1, 0, 0, 0, 0, 0, 0, 0, ScoreTqReqSurrenderPriorityInherit_Post_Dequeue_NA, + { 1, 0, 0, 0, 0, 0, 0, 0, 0, + ScoreTqReqSurrenderPriorityInherit_Post_Dequeue_NA, ScoreTqReqSurrenderPriorityInherit_Post_Unblock_NA, ScoreTqReqSurrenderPriorityInherit_Post_PreviousOwnerPriority_NA, + ScoreTqReqSurrenderPriorityInherit_Post_NewPriority_NA, ScoreTqReqSurrenderPriorityInherit_Post_RemoveHelper_NA, ScoreTqReqSurrenderPriorityInherit_Post_AddHelper_NA, ScoreTqReqSurrenderPriorityInherit_Post_Suspended_NA }, #else - { 0, 0, 0, 0, 0, 0, 0, 0, + { 1, 0, 0, 0, 0, 0, 0, 0, 0, + ScoreTqReqSurrenderPriorityInherit_Post_Dequeue_NA, + ScoreTqReqSurrenderPriorityInherit_Post_Unblock_NA, + ScoreTqReqSurrenderPriorityInherit_Post_PreviousOwnerPriority_NA, + ScoreTqReqSurrenderPriorityInherit_Post_NewPriority_NA, + ScoreTqReqSurrenderPriorityInherit_Post_RemoveHelper_NA, + ScoreTqReqSurrenderPriorityInherit_Post_AddHelper_NA, + ScoreTqReqSurrenderPriorityInherit_Post_Suspended_NA }, +#endif + { 0, 0, 0, 0, 0, 0, 0, 0, 0, ScoreTqReqSurrenderPriorityInherit_Post_Dequeue_Priority, ScoreTqReqSurrenderPriorityInherit_Post_Unblock_No, ScoreTqReqSurrenderPriorityInherit_Post_PreviousOwnerPriority_Drop, - ScoreTqReqSurrenderPriorityInherit_Post_RemoveHelper_Yes, - ScoreTqReqSurrenderPriorityInherit_Post_AddHelper_Yes, + ScoreTqReqSurrenderPriorityInherit_Post_NewPriority_Nop, + ScoreTqReqSurrenderPriorityInherit_Post_RemoveHelper_No, + ScoreTqReqSurrenderPriorityInherit_Post_AddHelper_No, ScoreTqReqSurrenderPriorityInherit_Post_Suspended_Yes }, -#endif #if !defined(RTEMS_SMP) - { 1, 0, 0, 0, 0, 0, 0, 0, ScoreTqReqSurrenderPriorityInherit_Post_Dequeue_NA, + { 1, 0, 0, 0, 0, 0, 0, 0, 0, + ScoreTqReqSurrenderPriorityInherit_Post_Dequeue_NA, ScoreTqReqSurrenderPriorityInherit_Post_Unblock_NA, ScoreTqReqSurrenderPriorityInherit_Post_PreviousOwnerPriority_NA, + ScoreTqReqSurrenderPriorityInherit_Post_NewPriority_NA, ScoreTqReqSurrenderPriorityInherit_Post_RemoveHelper_NA, ScoreTqReqSurrenderPriorityInherit_Post_AddHelper_NA, ScoreTqReqSurrenderPriorityInherit_Post_Suspended_NA }, #else - { 0, 0, 0, 0, 0, 0, 0, 0, + { 0, 0, 0, 0, 0, 0, 0, 0, 0, ScoreTqReqSurrenderPriorityInherit_Post_Dequeue_Priority, ScoreTqReqSurrenderPriorityInherit_Post_Unblock_No, ScoreTqReqSurrenderPriorityInherit_Post_PreviousOwnerPriority_Drop, - ScoreTqReqSurrenderPriorityInherit_Post_RemoveHelper_Yes, + ScoreTqReqSurrenderPriorityInherit_Post_NewPriority_Nop, + ScoreTqReqSurrenderPriorityInherit_Post_RemoveHelper_No, ScoreTqReqSurrenderPriorityInherit_Post_AddHelper_No, ScoreTqReqSurrenderPriorityInherit_Post_Suspended_Yes }, #endif + { 0, 0, 0, 0, 0, 0, 0, 0, 0, + ScoreTqReqSurrenderPriorityInherit_Post_Dequeue_Priority, + ScoreTqReqSurrenderPriorityInherit_Post_Unblock_Yes, + ScoreTqReqSurrenderPriorityInherit_Post_PreviousOwnerPriority_Drop, + ScoreTqReqSurrenderPriorityInherit_Post_NewPriority_Nop, + ScoreTqReqSurrenderPriorityInherit_Post_RemoveHelper_No, + ScoreTqReqSurrenderPriorityInherit_Post_AddHelper_No, + ScoreTqReqSurrenderPriorityInherit_Post_Suspended_No }, #if !defined(RTEMS_SMP) - { 1, 0, 0, 0, 0, 0, 0, 0, ScoreTqReqSurrenderPriorityInherit_Post_Dequeue_NA, + { 1, 0, 0, 0, 0, 0, 0, 0, 0, + ScoreTqReqSurrenderPriorityInherit_Post_Dequeue_NA, ScoreTqReqSurrenderPriorityInherit_Post_Unblock_NA, ScoreTqReqSurrenderPriorityInherit_Post_PreviousOwnerPriority_NA, + ScoreTqReqSurrenderPriorityInherit_Post_NewPriority_NA, ScoreTqReqSurrenderPriorityInherit_Post_RemoveHelper_NA, ScoreTqReqSurrenderPriorityInherit_Post_AddHelper_NA, ScoreTqReqSurrenderPriorityInherit_Post_Suspended_NA }, #else - { 0, 0, 0, 0, 0, 0, 0, 0, + { 0, 0, 0, 0, 0, 0, 0, 0, 0, ScoreTqReqSurrenderPriorityInherit_Post_Dequeue_Priority, ScoreTqReqSurrenderPriorityInherit_Post_Unblock_No, ScoreTqReqSurrenderPriorityInherit_Post_PreviousOwnerPriority_Drop, + ScoreTqReqSurrenderPriorityInherit_Post_NewPriority_Nop, ScoreTqReqSurrenderPriorityInherit_Post_RemoveHelper_No, - ScoreTqReqSurrenderPriorityInherit_Post_AddHelper_Yes, - ScoreTqReqSurrenderPriorityInherit_Post_Suspended_Yes }, + ScoreTqReqSurrenderPriorityInherit_Post_AddHelper_No, + ScoreTqReqSurrenderPriorityInherit_Post_Suspended_No }, #endif + { 0, 0, 0, 0, 0, 0, 0, 0, 0, + ScoreTqReqSurrenderPriorityInherit_Post_Dequeue_Priority, + ScoreTqReqSurrenderPriorityInherit_Post_Unblock_No, + ScoreTqReqSurrenderPriorityInherit_Post_PreviousOwnerPriority_Nop, + ScoreTqReqSurrenderPriorityInherit_Post_NewPriority_Nop, + ScoreTqReqSurrenderPriorityInherit_Post_RemoveHelper_No, + ScoreTqReqSurrenderPriorityInherit_Post_AddHelper_No, + ScoreTqReqSurrenderPriorityInherit_Post_Suspended_Yes }, #if !defined(RTEMS_SMP) - { 1, 0, 0, 0, 0, 0, 0, 0, ScoreTqReqSurrenderPriorityInherit_Post_Dequeue_NA, + { 1, 0, 0, 0, 0, 0, 0, 0, 0, + ScoreTqReqSurrenderPriorityInherit_Post_Dequeue_NA, ScoreTqReqSurrenderPriorityInherit_Post_Unblock_NA, ScoreTqReqSurrenderPriorityInherit_Post_PreviousOwnerPriority_NA, + ScoreTqReqSurrenderPriorityInherit_Post_NewPriority_NA, ScoreTqReqSurrenderPriorityInherit_Post_RemoveHelper_NA, ScoreTqReqSurrenderPriorityInherit_Post_AddHelper_NA, ScoreTqReqSurrenderPriorityInherit_Post_Suspended_NA }, #else - { 0, 0, 0, 0, 0, 0, 0, 0, + { 0, 0, 0, 0, 0, 0, 0, 0, 0, ScoreTqReqSurrenderPriorityInherit_Post_Dequeue_Priority, ScoreTqReqSurrenderPriorityInherit_Post_Unblock_No, ScoreTqReqSurrenderPriorityInherit_Post_PreviousOwnerPriority_Nop, - ScoreTqReqSurrenderPriorityInherit_Post_RemoveHelper_Yes, - ScoreTqReqSurrenderPriorityInherit_Post_AddHelper_Yes, + ScoreTqReqSurrenderPriorityInherit_Post_NewPriority_Nop, + ScoreTqReqSurrenderPriorityInherit_Post_RemoveHelper_No, + ScoreTqReqSurrenderPriorityInherit_Post_AddHelper_No, ScoreTqReqSurrenderPriorityInherit_Post_Suspended_Yes }, #endif + { 0, 0, 0, 0, 0, 0, 0, 0, 0, + ScoreTqReqSurrenderPriorityInherit_Post_Dequeue_Priority, + ScoreTqReqSurrenderPriorityInherit_Post_Unblock_Yes, + ScoreTqReqSurrenderPriorityInherit_Post_PreviousOwnerPriority_Nop, + ScoreTqReqSurrenderPriorityInherit_Post_NewPriority_Nop, + ScoreTqReqSurrenderPriorityInherit_Post_RemoveHelper_No, + ScoreTqReqSurrenderPriorityInherit_Post_AddHelper_No, + ScoreTqReqSurrenderPriorityInherit_Post_Suspended_No }, #if !defined(RTEMS_SMP) - { 1, 0, 0, 0, 0, 0, 0, 0, ScoreTqReqSurrenderPriorityInherit_Post_Dequeue_NA, + { 1, 0, 0, 0, 0, 0, 0, 0, 0, + ScoreTqReqSurrenderPriorityInherit_Post_Dequeue_NA, ScoreTqReqSurrenderPriorityInherit_Post_Unblock_NA, ScoreTqReqSurrenderPriorityInherit_Post_PreviousOwnerPriority_NA, + ScoreTqReqSurrenderPriorityInherit_Post_NewPriority_NA, ScoreTqReqSurrenderPriorityInherit_Post_RemoveHelper_NA, ScoreTqReqSurrenderPriorityInherit_Post_AddHelper_NA, ScoreTqReqSurrenderPriorityInherit_Post_Suspended_NA }, #else - { 0, 0, 0, 0, 0, 0, 0, 0, + { 0, 0, 0, 0, 0, 0, 0, 0, 0, ScoreTqReqSurrenderPriorityInherit_Post_Dequeue_Priority, ScoreTqReqSurrenderPriorityInherit_Post_Unblock_No, ScoreTqReqSurrenderPriorityInherit_Post_PreviousOwnerPriority_Nop, + ScoreTqReqSurrenderPriorityInherit_Post_NewPriority_Nop, + ScoreTqReqSurrenderPriorityInherit_Post_RemoveHelper_No, + ScoreTqReqSurrenderPriorityInherit_Post_AddHelper_No, + ScoreTqReqSurrenderPriorityInherit_Post_Suspended_No }, +#endif + { 0, 0, 0, 0, 0, 0, 0, 0, 0, + ScoreTqReqSurrenderPriorityInherit_Post_Dequeue_Priority, + ScoreTqReqSurrenderPriorityInherit_Post_Unblock_No, + ScoreTqReqSurrenderPriorityInherit_Post_PreviousOwnerPriority_Drop, + ScoreTqReqSurrenderPriorityInherit_Post_NewPriority_Raise, + ScoreTqReqSurrenderPriorityInherit_Post_RemoveHelper_Yes, + ScoreTqReqSurrenderPriorityInherit_Post_AddHelper_No, + ScoreTqReqSurrenderPriorityInherit_Post_Suspended_Yes }, +#if !defined(RTEMS_SMP) + { 1, 0, 0, 0, 0, 0, 0, 0, 0, + ScoreTqReqSurrenderPriorityInherit_Post_Dequeue_NA, + ScoreTqReqSurrenderPriorityInherit_Post_Unblock_NA, + ScoreTqReqSurrenderPriorityInherit_Post_PreviousOwnerPriority_NA, + ScoreTqReqSurrenderPriorityInherit_Post_NewPriority_NA, + ScoreTqReqSurrenderPriorityInherit_Post_RemoveHelper_NA, + ScoreTqReqSurrenderPriorityInherit_Post_AddHelper_NA, + ScoreTqReqSurrenderPriorityInherit_Post_Suspended_NA }, +#else + { 0, 0, 0, 0, 0, 0, 0, 0, 0, + ScoreTqReqSurrenderPriorityInherit_Post_Dequeue_Priority, + ScoreTqReqSurrenderPriorityInherit_Post_Unblock_No, + ScoreTqReqSurrenderPriorityInherit_Post_PreviousOwnerPriority_Drop, + ScoreTqReqSurrenderPriorityInherit_Post_NewPriority_Raise, ScoreTqReqSurrenderPriorityInherit_Post_RemoveHelper_Yes, ScoreTqReqSurrenderPriorityInherit_Post_AddHelper_No, ScoreTqReqSurrenderPriorityInherit_Post_Suspended_Yes }, #endif + { 0, 0, 0, 0, 0, 0, 0, 0, 0, + ScoreTqReqSurrenderPriorityInherit_Post_Dequeue_Priority, + ScoreTqReqSurrenderPriorityInherit_Post_Unblock_Yes, + ScoreTqReqSurrenderPriorityInherit_Post_PreviousOwnerPriority_Drop, + ScoreTqReqSurrenderPriorityInherit_Post_NewPriority_Raise, + ScoreTqReqSurrenderPriorityInherit_Post_RemoveHelper_Yes, + ScoreTqReqSurrenderPriorityInherit_Post_AddHelper_No, + ScoreTqReqSurrenderPriorityInherit_Post_Suspended_No }, #if !defined(RTEMS_SMP) - { 1, 0, 0, 0, 0, 0, 0, 0, ScoreTqReqSurrenderPriorityInherit_Post_Dequeue_NA, + { 1, 0, 0, 0, 0, 0, 0, 0, 0, + ScoreTqReqSurrenderPriorityInherit_Post_Dequeue_NA, ScoreTqReqSurrenderPriorityInherit_Post_Unblock_NA, ScoreTqReqSurrenderPriorityInherit_Post_PreviousOwnerPriority_NA, + ScoreTqReqSurrenderPriorityInherit_Post_NewPriority_NA, ScoreTqReqSurrenderPriorityInherit_Post_RemoveHelper_NA, ScoreTqReqSurrenderPriorityInherit_Post_AddHelper_NA, ScoreTqReqSurrenderPriorityInherit_Post_Suspended_NA }, #else - { 0, 0, 0, 0, 0, 0, 0, 0, + { 0, 0, 0, 0, 0, 0, 0, 0, 0, ScoreTqReqSurrenderPriorityInherit_Post_Dequeue_Priority, ScoreTqReqSurrenderPriorityInherit_Post_Unblock_No, - ScoreTqReqSurrenderPriorityInherit_Post_PreviousOwnerPriority_Nop, - ScoreTqReqSurrenderPriorityInherit_Post_RemoveHelper_No, + ScoreTqReqSurrenderPriorityInherit_Post_PreviousOwnerPriority_Drop, + ScoreTqReqSurrenderPriorityInherit_Post_NewPriority_Raise, + ScoreTqReqSurrenderPriorityInherit_Post_RemoveHelper_Yes, + ScoreTqReqSurrenderPriorityInherit_Post_AddHelper_No, + ScoreTqReqSurrenderPriorityInherit_Post_Suspended_No }, +#endif + { 0, 0, 0, 0, 0, 0, 0, 0, 0, + ScoreTqReqSurrenderPriorityInherit_Post_Dequeue_Priority, + ScoreTqReqSurrenderPriorityInherit_Post_Unblock_No, + ScoreTqReqSurrenderPriorityInherit_Post_PreviousOwnerPriority_Drop, + ScoreTqReqSurrenderPriorityInherit_Post_NewPriority_Nop, + ScoreTqReqSurrenderPriorityInherit_Post_RemoveHelper_Yes, + ScoreTqReqSurrenderPriorityInherit_Post_AddHelper_Yes, + ScoreTqReqSurrenderPriorityInherit_Post_Suspended_Yes }, +#if !defined(RTEMS_SMP) + { 1, 0, 0, 0, 0, 0, 0, 0, 0, + ScoreTqReqSurrenderPriorityInherit_Post_Dequeue_NA, + ScoreTqReqSurrenderPriorityInherit_Post_Unblock_NA, + ScoreTqReqSurrenderPriorityInherit_Post_PreviousOwnerPriority_NA, + ScoreTqReqSurrenderPriorityInherit_Post_NewPriority_NA, + ScoreTqReqSurrenderPriorityInherit_Post_RemoveHelper_NA, + ScoreTqReqSurrenderPriorityInherit_Post_AddHelper_NA, + ScoreTqReqSurrenderPriorityInherit_Post_Suspended_NA }, +#else + { 0, 0, 0, 0, 0, 0, 0, 0, 0, + ScoreTqReqSurrenderPriorityInherit_Post_Dequeue_Priority, + ScoreTqReqSurrenderPriorityInherit_Post_Unblock_No, + ScoreTqReqSurrenderPriorityInherit_Post_PreviousOwnerPriority_Drop, + ScoreTqReqSurrenderPriorityInherit_Post_NewPriority_Nop, + ScoreTqReqSurrenderPriorityInherit_Post_RemoveHelper_Yes, ScoreTqReqSurrenderPriorityInherit_Post_AddHelper_Yes, ScoreTqReqSurrenderPriorityInherit_Post_Suspended_Yes }, #endif + { 0, 0, 0, 0, 0, 0, 0, 0, 0, + ScoreTqReqSurrenderPriorityInherit_Post_Dequeue_Priority, + ScoreTqReqSurrenderPriorityInherit_Post_Unblock_Yes, + ScoreTqReqSurrenderPriorityInherit_Post_PreviousOwnerPriority_Drop, + ScoreTqReqSurrenderPriorityInherit_Post_NewPriority_Nop, + ScoreTqReqSurrenderPriorityInherit_Post_RemoveHelper_Yes, + ScoreTqReqSurrenderPriorityInherit_Post_AddHelper_Yes, + ScoreTqReqSurrenderPriorityInherit_Post_Suspended_No }, #if !defined(RTEMS_SMP) - { 1, 0, 0, 0, 0, 0, 0, 0, ScoreTqReqSurrenderPriorityInherit_Post_Dequeue_NA, + { 1, 0, 0, 0, 0, 0, 0, 0, 0, + ScoreTqReqSurrenderPriorityInherit_Post_Dequeue_NA, ScoreTqReqSurrenderPriorityInherit_Post_Unblock_NA, ScoreTqReqSurrenderPriorityInherit_Post_PreviousOwnerPriority_NA, + ScoreTqReqSurrenderPriorityInherit_Post_NewPriority_NA, ScoreTqReqSurrenderPriorityInherit_Post_RemoveHelper_NA, ScoreTqReqSurrenderPriorityInherit_Post_AddHelper_NA, ScoreTqReqSurrenderPriorityInherit_Post_Suspended_NA }, #else - { 0, 0, 0, 0, 0, 0, 0, 0, + { 0, 0, 0, 0, 0, 0, 0, 0, 0, ScoreTqReqSurrenderPriorityInherit_Post_Dequeue_Priority, ScoreTqReqSurrenderPriorityInherit_Post_Unblock_No, ScoreTqReqSurrenderPriorityInherit_Post_PreviousOwnerPriority_Drop, - ScoreTqReqSurrenderPriorityInherit_Post_RemoveHelper_No, + ScoreTqReqSurrenderPriorityInherit_Post_NewPriority_Nop, + ScoreTqReqSurrenderPriorityInherit_Post_RemoveHelper_Yes, + ScoreTqReqSurrenderPriorityInherit_Post_AddHelper_Yes, + ScoreTqReqSurrenderPriorityInherit_Post_Suspended_No }, +#endif + { 0, 0, 0, 0, 0, 0, 0, 0, 0, + ScoreTqReqSurrenderPriorityInherit_Post_Dequeue_Priority, + ScoreTqReqSurrenderPriorityInherit_Post_Unblock_No, + ScoreTqReqSurrenderPriorityInherit_Post_PreviousOwnerPriority_Drop, + ScoreTqReqSurrenderPriorityInherit_Post_NewPriority_Nop, + ScoreTqReqSurrenderPriorityInherit_Post_RemoveHelper_Yes, ScoreTqReqSurrenderPriorityInherit_Post_AddHelper_No, ScoreTqReqSurrenderPriorityInherit_Post_Suspended_Yes }, -#endif #if !defined(RTEMS_SMP) - { 1, 0, 0, 0, 0, 0, 0, 0, ScoreTqReqSurrenderPriorityInherit_Post_Dequeue_NA, + { 1, 0, 0, 0, 0, 0, 0, 0, 0, + ScoreTqReqSurrenderPriorityInherit_Post_Dequeue_NA, ScoreTqReqSurrenderPriorityInherit_Post_Unblock_NA, ScoreTqReqSurrenderPriorityInherit_Post_PreviousOwnerPriority_NA, + ScoreTqReqSurrenderPriorityInherit_Post_NewPriority_NA, ScoreTqReqSurrenderPriorityInherit_Post_RemoveHelper_NA, ScoreTqReqSurrenderPriorityInherit_Post_AddHelper_NA, ScoreTqReqSurrenderPriorityInherit_Post_Suspended_NA }, #else - { 0, 0, 0, 0, 0, 0, 0, 0, + { 0, 0, 0, 0, 0, 0, 0, 0, 0, ScoreTqReqSurrenderPriorityInherit_Post_Dequeue_Priority, ScoreTqReqSurrenderPriorityInherit_Post_Unblock_No, - ScoreTqReqSurrenderPriorityInherit_Post_PreviousOwnerPriority_Nop, - ScoreTqReqSurrenderPriorityInherit_Post_RemoveHelper_No, + ScoreTqReqSurrenderPriorityInherit_Post_PreviousOwnerPriority_Drop, + ScoreTqReqSurrenderPriorityInherit_Post_NewPriority_Nop, + ScoreTqReqSurrenderPriorityInherit_Post_RemoveHelper_Yes, ScoreTqReqSurrenderPriorityInherit_Post_AddHelper_No, ScoreTqReqSurrenderPriorityInherit_Post_Suspended_Yes }, #endif + { 0, 0, 0, 0, 0, 0, 0, 0, 0, + ScoreTqReqSurrenderPriorityInherit_Post_Dequeue_Priority, + ScoreTqReqSurrenderPriorityInherit_Post_Unblock_Yes, + ScoreTqReqSurrenderPriorityInherit_Post_PreviousOwnerPriority_Drop, + ScoreTqReqSurrenderPriorityInherit_Post_NewPriority_Nop, + ScoreTqReqSurrenderPriorityInherit_Post_RemoveHelper_Yes, + ScoreTqReqSurrenderPriorityInherit_Post_AddHelper_No, + ScoreTqReqSurrenderPriorityInherit_Post_Suspended_No }, #if !defined(RTEMS_SMP) - { 1, 0, 0, 0, 0, 0, 0, 0, ScoreTqReqSurrenderPriorityInherit_Post_Dequeue_NA, + { 1, 0, 0, 0, 0, 0, 0, 0, 0, + ScoreTqReqSurrenderPriorityInherit_Post_Dequeue_NA, ScoreTqReqSurrenderPriorityInherit_Post_Unblock_NA, ScoreTqReqSurrenderPriorityInherit_Post_PreviousOwnerPriority_NA, + ScoreTqReqSurrenderPriorityInherit_Post_NewPriority_NA, ScoreTqReqSurrenderPriorityInherit_Post_RemoveHelper_NA, ScoreTqReqSurrenderPriorityInherit_Post_AddHelper_NA, ScoreTqReqSurrenderPriorityInherit_Post_Suspended_NA }, #else - { 0, 0, 0, 0, 0, 0, 0, 0, + { 0, 0, 0, 0, 0, 0, 0, 0, 0, ScoreTqReqSurrenderPriorityInherit_Post_Dequeue_Priority, ScoreTqReqSurrenderPriorityInherit_Post_Unblock_No, ScoreTqReqSurrenderPriorityInherit_Post_PreviousOwnerPriority_Drop, + ScoreTqReqSurrenderPriorityInherit_Post_NewPriority_Nop, ScoreTqReqSurrenderPriorityInherit_Post_RemoveHelper_Yes, - ScoreTqReqSurrenderPriorityInherit_Post_AddHelper_Yes, + ScoreTqReqSurrenderPriorityInherit_Post_AddHelper_No, ScoreTqReqSurrenderPriorityInherit_Post_Suspended_No }, #endif + { 0, 0, 0, 0, 0, 0, 0, 0, 0, + ScoreTqReqSurrenderPriorityInherit_Post_Dequeue_Priority, + ScoreTqReqSurrenderPriorityInherit_Post_Unblock_No, + ScoreTqReqSurrenderPriorityInherit_Post_PreviousOwnerPriority_Drop, + ScoreTqReqSurrenderPriorityInherit_Post_NewPriority_Raise, + ScoreTqReqSurrenderPriorityInherit_Post_RemoveHelper_No, + ScoreTqReqSurrenderPriorityInherit_Post_AddHelper_No, + ScoreTqReqSurrenderPriorityInherit_Post_Suspended_Yes }, #if !defined(RTEMS_SMP) - { 1, 0, 0, 0, 0, 0, 0, 0, ScoreTqReqSurrenderPriorityInherit_Post_Dequeue_NA, + { 1, 0, 0, 0, 0, 0, 0, 0, 0, + ScoreTqReqSurrenderPriorityInherit_Post_Dequeue_NA, ScoreTqReqSurrenderPriorityInherit_Post_Unblock_NA, ScoreTqReqSurrenderPriorityInherit_Post_PreviousOwnerPriority_NA, + ScoreTqReqSurrenderPriorityInherit_Post_NewPriority_NA, ScoreTqReqSurrenderPriorityInherit_Post_RemoveHelper_NA, ScoreTqReqSurrenderPriorityInherit_Post_AddHelper_NA, ScoreTqReqSurrenderPriorityInherit_Post_Suspended_NA }, #else - { 0, 0, 0, 0, 0, 0, 0, 0, + { 0, 0, 0, 0, 0, 0, 0, 0, 0, ScoreTqReqSurrenderPriorityInherit_Post_Dequeue_Priority, ScoreTqReqSurrenderPriorityInherit_Post_Unblock_No, ScoreTqReqSurrenderPriorityInherit_Post_PreviousOwnerPriority_Drop, - ScoreTqReqSurrenderPriorityInherit_Post_RemoveHelper_Yes, + ScoreTqReqSurrenderPriorityInherit_Post_NewPriority_Raise, + ScoreTqReqSurrenderPriorityInherit_Post_RemoveHelper_No, + ScoreTqReqSurrenderPriorityInherit_Post_AddHelper_No, + ScoreTqReqSurrenderPriorityInherit_Post_Suspended_Yes }, +#endif + { 0, 0, 0, 0, 0, 0, 0, 0, 0, + ScoreTqReqSurrenderPriorityInherit_Post_Dequeue_Priority, + ScoreTqReqSurrenderPriorityInherit_Post_Unblock_Yes, + ScoreTqReqSurrenderPriorityInherit_Post_PreviousOwnerPriority_Drop, + ScoreTqReqSurrenderPriorityInherit_Post_NewPriority_Raise, + ScoreTqReqSurrenderPriorityInherit_Post_RemoveHelper_No, + ScoreTqReqSurrenderPriorityInherit_Post_AddHelper_No, + ScoreTqReqSurrenderPriorityInherit_Post_Suspended_No }, +#if !defined(RTEMS_SMP) + { 1, 0, 0, 0, 0, 0, 0, 0, 0, + ScoreTqReqSurrenderPriorityInherit_Post_Dequeue_NA, + ScoreTqReqSurrenderPriorityInherit_Post_Unblock_NA, + ScoreTqReqSurrenderPriorityInherit_Post_PreviousOwnerPriority_NA, + ScoreTqReqSurrenderPriorityInherit_Post_NewPriority_NA, + ScoreTqReqSurrenderPriorityInherit_Post_RemoveHelper_NA, + ScoreTqReqSurrenderPriorityInherit_Post_AddHelper_NA, + ScoreTqReqSurrenderPriorityInherit_Post_Suspended_NA }, +#else + { 0, 0, 0, 0, 0, 0, 0, 0, 0, + ScoreTqReqSurrenderPriorityInherit_Post_Dequeue_Priority, + ScoreTqReqSurrenderPriorityInherit_Post_Unblock_No, + ScoreTqReqSurrenderPriorityInherit_Post_PreviousOwnerPriority_Drop, + ScoreTqReqSurrenderPriorityInherit_Post_NewPriority_Raise, + ScoreTqReqSurrenderPriorityInherit_Post_RemoveHelper_No, ScoreTqReqSurrenderPriorityInherit_Post_AddHelper_No, ScoreTqReqSurrenderPriorityInherit_Post_Suspended_No }, #endif + { 0, 0, 0, 0, 0, 0, 0, 0, 0, + ScoreTqReqSurrenderPriorityInherit_Post_Dequeue_Priority, + ScoreTqReqSurrenderPriorityInherit_Post_Unblock_No, + ScoreTqReqSurrenderPriorityInherit_Post_PreviousOwnerPriority_Drop, + ScoreTqReqSurrenderPriorityInherit_Post_NewPriority_Nop, + ScoreTqReqSurrenderPriorityInherit_Post_RemoveHelper_No, + ScoreTqReqSurrenderPriorityInherit_Post_AddHelper_Yes, + ScoreTqReqSurrenderPriorityInherit_Post_Suspended_Yes }, #if !defined(RTEMS_SMP) - { 1, 0, 0, 0, 0, 0, 0, 0, ScoreTqReqSurrenderPriorityInherit_Post_Dequeue_NA, + { 1, 0, 0, 0, 0, 0, 0, 0, 0, + ScoreTqReqSurrenderPriorityInherit_Post_Dequeue_NA, ScoreTqReqSurrenderPriorityInherit_Post_Unblock_NA, ScoreTqReqSurrenderPriorityInherit_Post_PreviousOwnerPriority_NA, + ScoreTqReqSurrenderPriorityInherit_Post_NewPriority_NA, ScoreTqReqSurrenderPriorityInherit_Post_RemoveHelper_NA, ScoreTqReqSurrenderPriorityInherit_Post_AddHelper_NA, ScoreTqReqSurrenderPriorityInherit_Post_Suspended_NA }, #else - { 0, 0, 0, 0, 0, 0, 0, 0, + { 0, 0, 0, 0, 0, 0, 0, 0, 0, ScoreTqReqSurrenderPriorityInherit_Post_Dequeue_Priority, ScoreTqReqSurrenderPriorityInherit_Post_Unblock_No, ScoreTqReqSurrenderPriorityInherit_Post_PreviousOwnerPriority_Drop, + ScoreTqReqSurrenderPriorityInherit_Post_NewPriority_Nop, ScoreTqReqSurrenderPriorityInherit_Post_RemoveHelper_No, ScoreTqReqSurrenderPriorityInherit_Post_AddHelper_Yes, - ScoreTqReqSurrenderPriorityInherit_Post_Suspended_No }, + ScoreTqReqSurrenderPriorityInherit_Post_Suspended_Yes }, #endif + { 0, 0, 0, 0, 0, 0, 0, 0, 0, + ScoreTqReqSurrenderPriorityInherit_Post_Dequeue_Priority, + ScoreTqReqSurrenderPriorityInherit_Post_Unblock_Yes, + ScoreTqReqSurrenderPriorityInherit_Post_PreviousOwnerPriority_Drop, + ScoreTqReqSurrenderPriorityInherit_Post_NewPriority_Nop, + ScoreTqReqSurrenderPriorityInherit_Post_RemoveHelper_No, + ScoreTqReqSurrenderPriorityInherit_Post_AddHelper_Yes, + ScoreTqReqSurrenderPriorityInherit_Post_Suspended_No }, #if !defined(RTEMS_SMP) - { 1, 0, 0, 0, 0, 0, 0, 0, ScoreTqReqSurrenderPriorityInherit_Post_Dequeue_NA, + { 1, 0, 0, 0, 0, 0, 0, 0, 0, + ScoreTqReqSurrenderPriorityInherit_Post_Dequeue_NA, ScoreTqReqSurrenderPriorityInherit_Post_Unblock_NA, ScoreTqReqSurrenderPriorityInherit_Post_PreviousOwnerPriority_NA, + ScoreTqReqSurrenderPriorityInherit_Post_NewPriority_NA, ScoreTqReqSurrenderPriorityInherit_Post_RemoveHelper_NA, ScoreTqReqSurrenderPriorityInherit_Post_AddHelper_NA, ScoreTqReqSurrenderPriorityInherit_Post_Suspended_NA }, #else - { 0, 0, 0, 0, 0, 0, 0, 0, + { 0, 0, 0, 0, 0, 0, 0, 0, 0, ScoreTqReqSurrenderPriorityInherit_Post_Dequeue_Priority, ScoreTqReqSurrenderPriorityInherit_Post_Unblock_No, ScoreTqReqSurrenderPriorityInherit_Post_PreviousOwnerPriority_Drop, + ScoreTqReqSurrenderPriorityInherit_Post_NewPriority_Nop, ScoreTqReqSurrenderPriorityInherit_Post_RemoveHelper_No, - ScoreTqReqSurrenderPriorityInherit_Post_AddHelper_No, + ScoreTqReqSurrenderPriorityInherit_Post_AddHelper_Yes, ScoreTqReqSurrenderPriorityInherit_Post_Suspended_No }, #endif + { 0, 0, 0, 0, 0, 0, 0, 0, 0, + ScoreTqReqSurrenderPriorityInherit_Post_Dequeue_Priority, + ScoreTqReqSurrenderPriorityInherit_Post_Unblock_No, + ScoreTqReqSurrenderPriorityInherit_Post_PreviousOwnerPriority_Nop, + ScoreTqReqSurrenderPriorityInherit_Post_NewPriority_Raise, + ScoreTqReqSurrenderPriorityInherit_Post_RemoveHelper_Yes, + ScoreTqReqSurrenderPriorityInherit_Post_AddHelper_No, + ScoreTqReqSurrenderPriorityInherit_Post_Suspended_Yes }, #if !defined(RTEMS_SMP) - { 1, 0, 0, 0, 0, 0, 0, 0, ScoreTqReqSurrenderPriorityInherit_Post_Dequeue_NA, + { 1, 0, 0, 0, 0, 0, 0, 0, 0, + ScoreTqReqSurrenderPriorityInherit_Post_Dequeue_NA, ScoreTqReqSurrenderPriorityInherit_Post_Unblock_NA, ScoreTqReqSurrenderPriorityInherit_Post_PreviousOwnerPriority_NA, + ScoreTqReqSurrenderPriorityInherit_Post_NewPriority_NA, ScoreTqReqSurrenderPriorityInherit_Post_RemoveHelper_NA, ScoreTqReqSurrenderPriorityInherit_Post_AddHelper_NA, ScoreTqReqSurrenderPriorityInherit_Post_Suspended_NA }, #else - { 0, 0, 0, 0, 0, 0, 0, 0, + { 0, 0, 0, 0, 0, 0, 0, 0, 0, ScoreTqReqSurrenderPriorityInherit_Post_Dequeue_Priority, ScoreTqReqSurrenderPriorityInherit_Post_Unblock_No, ScoreTqReqSurrenderPriorityInherit_Post_PreviousOwnerPriority_Nop, + ScoreTqReqSurrenderPriorityInherit_Post_NewPriority_Raise, ScoreTqReqSurrenderPriorityInherit_Post_RemoveHelper_Yes, - ScoreTqReqSurrenderPriorityInherit_Post_AddHelper_Yes, - ScoreTqReqSurrenderPriorityInherit_Post_Suspended_No }, + ScoreTqReqSurrenderPriorityInherit_Post_AddHelper_No, + ScoreTqReqSurrenderPriorityInherit_Post_Suspended_Yes }, #endif + { 0, 0, 0, 0, 0, 0, 0, 0, 0, + ScoreTqReqSurrenderPriorityInherit_Post_Dequeue_Priority, + ScoreTqReqSurrenderPriorityInherit_Post_Unblock_Yes, + ScoreTqReqSurrenderPriorityInherit_Post_PreviousOwnerPriority_Nop, + ScoreTqReqSurrenderPriorityInherit_Post_NewPriority_Raise, + ScoreTqReqSurrenderPriorityInherit_Post_RemoveHelper_Yes, + ScoreTqReqSurrenderPriorityInherit_Post_AddHelper_No, + ScoreTqReqSurrenderPriorityInherit_Post_Suspended_No }, #if !defined(RTEMS_SMP) - { 1, 0, 0, 0, 0, 0, 0, 0, ScoreTqReqSurrenderPriorityInherit_Post_Dequeue_NA, + { 1, 0, 0, 0, 0, 0, 0, 0, 0, + ScoreTqReqSurrenderPriorityInherit_Post_Dequeue_NA, ScoreTqReqSurrenderPriorityInherit_Post_Unblock_NA, ScoreTqReqSurrenderPriorityInherit_Post_PreviousOwnerPriority_NA, + ScoreTqReqSurrenderPriorityInherit_Post_NewPriority_NA, ScoreTqReqSurrenderPriorityInherit_Post_RemoveHelper_NA, ScoreTqReqSurrenderPriorityInherit_Post_AddHelper_NA, ScoreTqReqSurrenderPriorityInherit_Post_Suspended_NA }, #else - { 0, 0, 0, 0, 0, 0, 0, 0, + { 0, 0, 0, 0, 0, 0, 0, 0, 0, ScoreTqReqSurrenderPriorityInherit_Post_Dequeue_Priority, ScoreTqReqSurrenderPriorityInherit_Post_Unblock_No, ScoreTqReqSurrenderPriorityInherit_Post_PreviousOwnerPriority_Nop, + ScoreTqReqSurrenderPriorityInherit_Post_NewPriority_Raise, ScoreTqReqSurrenderPriorityInherit_Post_RemoveHelper_Yes, ScoreTqReqSurrenderPriorityInherit_Post_AddHelper_No, ScoreTqReqSurrenderPriorityInherit_Post_Suspended_No }, #endif + { 0, 0, 0, 0, 0, 0, 0, 0, 0, + ScoreTqReqSurrenderPriorityInherit_Post_Dequeue_Priority, + ScoreTqReqSurrenderPriorityInherit_Post_Unblock_No, + ScoreTqReqSurrenderPriorityInherit_Post_PreviousOwnerPriority_Nop, + ScoreTqReqSurrenderPriorityInherit_Post_NewPriority_Nop, + ScoreTqReqSurrenderPriorityInherit_Post_RemoveHelper_Yes, + ScoreTqReqSurrenderPriorityInherit_Post_AddHelper_Yes, + ScoreTqReqSurrenderPriorityInherit_Post_Suspended_Yes }, #if !defined(RTEMS_SMP) - { 1, 0, 0, 0, 0, 0, 0, 0, ScoreTqReqSurrenderPriorityInherit_Post_Dequeue_NA, + { 1, 0, 0, 0, 0, 0, 0, 0, 0, + ScoreTqReqSurrenderPriorityInherit_Post_Dequeue_NA, ScoreTqReqSurrenderPriorityInherit_Post_Unblock_NA, ScoreTqReqSurrenderPriorityInherit_Post_PreviousOwnerPriority_NA, + ScoreTqReqSurrenderPriorityInherit_Post_NewPriority_NA, ScoreTqReqSurrenderPriorityInherit_Post_RemoveHelper_NA, ScoreTqReqSurrenderPriorityInherit_Post_AddHelper_NA, ScoreTqReqSurrenderPriorityInherit_Post_Suspended_NA }, #else - { 0, 0, 0, 0, 0, 0, 0, 0, + { 0, 0, 0, 0, 0, 0, 0, 0, 0, ScoreTqReqSurrenderPriorityInherit_Post_Dequeue_Priority, ScoreTqReqSurrenderPriorityInherit_Post_Unblock_No, ScoreTqReqSurrenderPriorityInherit_Post_PreviousOwnerPriority_Nop, - ScoreTqReqSurrenderPriorityInherit_Post_RemoveHelper_No, + ScoreTqReqSurrenderPriorityInherit_Post_NewPriority_Nop, + ScoreTqReqSurrenderPriorityInherit_Post_RemoveHelper_Yes, ScoreTqReqSurrenderPriorityInherit_Post_AddHelper_Yes, - ScoreTqReqSurrenderPriorityInherit_Post_Suspended_No }, + ScoreTqReqSurrenderPriorityInherit_Post_Suspended_Yes }, #endif + { 0, 0, 0, 0, 0, 0, 0, 0, 0, + ScoreTqReqSurrenderPriorityInherit_Post_Dequeue_Priority, + ScoreTqReqSurrenderPriorityInherit_Post_Unblock_Yes, + ScoreTqReqSurrenderPriorityInherit_Post_PreviousOwnerPriority_Nop, + ScoreTqReqSurrenderPriorityInherit_Post_NewPriority_Nop, + ScoreTqReqSurrenderPriorityInherit_Post_RemoveHelper_Yes, + ScoreTqReqSurrenderPriorityInherit_Post_AddHelper_Yes, + ScoreTqReqSurrenderPriorityInherit_Post_Suspended_No }, #if !defined(RTEMS_SMP) - { 1, 0, 0, 0, 0, 0, 0, 0, ScoreTqReqSurrenderPriorityInherit_Post_Dequeue_NA, + { 1, 0, 0, 0, 0, 0, 0, 0, 0, + ScoreTqReqSurrenderPriorityInherit_Post_Dequeue_NA, ScoreTqReqSurrenderPriorityInherit_Post_Unblock_NA, ScoreTqReqSurrenderPriorityInherit_Post_PreviousOwnerPriority_NA, + ScoreTqReqSurrenderPriorityInherit_Post_NewPriority_NA, ScoreTqReqSurrenderPriorityInherit_Post_RemoveHelper_NA, ScoreTqReqSurrenderPriorityInherit_Post_AddHelper_NA, ScoreTqReqSurrenderPriorityInherit_Post_Suspended_NA }, #else - { 0, 0, 0, 0, 0, 0, 0, 0, + { 0, 0, 0, 0, 0, 0, 0, 0, 0, ScoreTqReqSurrenderPriorityInherit_Post_Dequeue_Priority, ScoreTqReqSurrenderPriorityInherit_Post_Unblock_No, ScoreTqReqSurrenderPriorityInherit_Post_PreviousOwnerPriority_Nop, - ScoreTqReqSurrenderPriorityInherit_Post_RemoveHelper_No, - ScoreTqReqSurrenderPriorityInherit_Post_AddHelper_No, + ScoreTqReqSurrenderPriorityInherit_Post_NewPriority_Nop, + ScoreTqReqSurrenderPriorityInherit_Post_RemoveHelper_Yes, + ScoreTqReqSurrenderPriorityInherit_Post_AddHelper_Yes, ScoreTqReqSurrenderPriorityInherit_Post_Suspended_No }, #endif - { 1, 0, 0, 0, 0, 0, 0, 0, ScoreTqReqSurrenderPriorityInherit_Post_Dequeue_NA, + { 0, 0, 0, 0, 0, 0, 0, 0, 0, + ScoreTqReqSurrenderPriorityInherit_Post_Dequeue_Priority, + ScoreTqReqSurrenderPriorityInherit_Post_Unblock_No, + ScoreTqReqSurrenderPriorityInherit_Post_PreviousOwnerPriority_Nop, + ScoreTqReqSurrenderPriorityInherit_Post_NewPriority_Nop, + ScoreTqReqSurrenderPriorityInherit_Post_RemoveHelper_Yes, + ScoreTqReqSurrenderPriorityInherit_Post_AddHelper_No, + ScoreTqReqSurrenderPriorityInherit_Post_Suspended_Yes }, +#if !defined(RTEMS_SMP) + { 1, 0, 0, 0, 0, 0, 0, 0, 0, + ScoreTqReqSurrenderPriorityInherit_Post_Dequeue_NA, ScoreTqReqSurrenderPriorityInherit_Post_Unblock_NA, ScoreTqReqSurrenderPriorityInherit_Post_PreviousOwnerPriority_NA, + ScoreTqReqSurrenderPriorityInherit_Post_NewPriority_NA, ScoreTqReqSurrenderPriorityInherit_Post_RemoveHelper_NA, ScoreTqReqSurrenderPriorityInherit_Post_AddHelper_NA, ScoreTqReqSurrenderPriorityInherit_Post_Suspended_NA }, +#else + { 0, 0, 0, 0, 0, 0, 0, 0, 0, + ScoreTqReqSurrenderPriorityInherit_Post_Dequeue_Priority, + ScoreTqReqSurrenderPriorityInherit_Post_Unblock_No, + ScoreTqReqSurrenderPriorityInherit_Post_PreviousOwnerPriority_Nop, + ScoreTqReqSurrenderPriorityInherit_Post_NewPriority_Nop, + ScoreTqReqSurrenderPriorityInherit_Post_RemoveHelper_Yes, + ScoreTqReqSurrenderPriorityInherit_Post_AddHelper_No, + ScoreTqReqSurrenderPriorityInherit_Post_Suspended_Yes }, +#endif + { 0, 0, 0, 0, 0, 0, 0, 0, 0, + ScoreTqReqSurrenderPriorityInherit_Post_Dequeue_Priority, + ScoreTqReqSurrenderPriorityInherit_Post_Unblock_Yes, + ScoreTqReqSurrenderPriorityInherit_Post_PreviousOwnerPriority_Nop, + ScoreTqReqSurrenderPriorityInherit_Post_NewPriority_Nop, + ScoreTqReqSurrenderPriorityInherit_Post_RemoveHelper_Yes, + ScoreTqReqSurrenderPriorityInherit_Post_AddHelper_No, + ScoreTqReqSurrenderPriorityInherit_Post_Suspended_No }, #if !defined(RTEMS_SMP) - { 1, 0, 0, 0, 0, 0, 0, 0, ScoreTqReqSurrenderPriorityInherit_Post_Dequeue_NA, + { 1, 0, 0, 0, 0, 0, 0, 0, 0, + ScoreTqReqSurrenderPriorityInherit_Post_Dequeue_NA, ScoreTqReqSurrenderPriorityInherit_Post_Unblock_NA, ScoreTqReqSurrenderPriorityInherit_Post_PreviousOwnerPriority_NA, + ScoreTqReqSurrenderPriorityInherit_Post_NewPriority_NA, ScoreTqReqSurrenderPriorityInherit_Post_RemoveHelper_NA, ScoreTqReqSurrenderPriorityInherit_Post_AddHelper_NA, ScoreTqReqSurrenderPriorityInherit_Post_Suspended_NA }, #else - { 0, 0, 0, 0, 0, 0, 0, 0, + { 0, 0, 0, 0, 0, 0, 0, 0, 0, ScoreTqReqSurrenderPriorityInherit_Post_Dequeue_Priority, - ScoreTqReqSurrenderPriorityInherit_Post_Unblock_Yes, - ScoreTqReqSurrenderPriorityInherit_Post_PreviousOwnerPriority_Drop, + ScoreTqReqSurrenderPriorityInherit_Post_Unblock_No, + ScoreTqReqSurrenderPriorityInherit_Post_PreviousOwnerPriority_Nop, + ScoreTqReqSurrenderPriorityInherit_Post_NewPriority_Nop, ScoreTqReqSurrenderPriorityInherit_Post_RemoveHelper_Yes, - ScoreTqReqSurrenderPriorityInherit_Post_AddHelper_Yes, + ScoreTqReqSurrenderPriorityInherit_Post_AddHelper_No, ScoreTqReqSurrenderPriorityInherit_Post_Suspended_No }, #endif + { 0, 0, 0, 0, 0, 0, 0, 0, 0, + ScoreTqReqSurrenderPriorityInherit_Post_Dequeue_Priority, + ScoreTqReqSurrenderPriorityInherit_Post_Unblock_No, + ScoreTqReqSurrenderPriorityInherit_Post_PreviousOwnerPriority_Nop, + ScoreTqReqSurrenderPriorityInherit_Post_NewPriority_Raise, + ScoreTqReqSurrenderPriorityInherit_Post_RemoveHelper_No, + ScoreTqReqSurrenderPriorityInherit_Post_AddHelper_No, + ScoreTqReqSurrenderPriorityInherit_Post_Suspended_Yes }, #if !defined(RTEMS_SMP) - { 1, 0, 0, 0, 0, 0, 0, 0, ScoreTqReqSurrenderPriorityInherit_Post_Dequeue_NA, + { 1, 0, 0, 0, 0, 0, 0, 0, 0, + ScoreTqReqSurrenderPriorityInherit_Post_Dequeue_NA, ScoreTqReqSurrenderPriorityInherit_Post_Unblock_NA, ScoreTqReqSurrenderPriorityInherit_Post_PreviousOwnerPriority_NA, + ScoreTqReqSurrenderPriorityInherit_Post_NewPriority_NA, ScoreTqReqSurrenderPriorityInherit_Post_RemoveHelper_NA, ScoreTqReqSurrenderPriorityInherit_Post_AddHelper_NA, ScoreTqReqSurrenderPriorityInherit_Post_Suspended_NA }, #else - { 0, 0, 0, 0, 0, 0, 0, 0, + { 0, 0, 0, 0, 0, 0, 0, 0, 0, + ScoreTqReqSurrenderPriorityInherit_Post_Dequeue_Priority, + ScoreTqReqSurrenderPriorityInherit_Post_Unblock_No, + ScoreTqReqSurrenderPriorityInherit_Post_PreviousOwnerPriority_Nop, + ScoreTqReqSurrenderPriorityInherit_Post_NewPriority_Raise, + ScoreTqReqSurrenderPriorityInherit_Post_RemoveHelper_No, + ScoreTqReqSurrenderPriorityInherit_Post_AddHelper_No, + ScoreTqReqSurrenderPriorityInherit_Post_Suspended_Yes }, +#endif + { 0, 0, 0, 0, 0, 0, 0, 0, 0, ScoreTqReqSurrenderPriorityInherit_Post_Dequeue_Priority, ScoreTqReqSurrenderPriorityInherit_Post_Unblock_Yes, - ScoreTqReqSurrenderPriorityInherit_Post_PreviousOwnerPriority_Drop, - ScoreTqReqSurrenderPriorityInherit_Post_RemoveHelper_Yes, + ScoreTqReqSurrenderPriorityInherit_Post_PreviousOwnerPriority_Nop, + ScoreTqReqSurrenderPriorityInherit_Post_NewPriority_Raise, + ScoreTqReqSurrenderPriorityInherit_Post_RemoveHelper_No, + ScoreTqReqSurrenderPriorityInherit_Post_AddHelper_No, + ScoreTqReqSurrenderPriorityInherit_Post_Suspended_No }, +#if !defined(RTEMS_SMP) + { 1, 0, 0, 0, 0, 0, 0, 0, 0, + ScoreTqReqSurrenderPriorityInherit_Post_Dequeue_NA, + ScoreTqReqSurrenderPriorityInherit_Post_Unblock_NA, + ScoreTqReqSurrenderPriorityInherit_Post_PreviousOwnerPriority_NA, + ScoreTqReqSurrenderPriorityInherit_Post_NewPriority_NA, + ScoreTqReqSurrenderPriorityInherit_Post_RemoveHelper_NA, + ScoreTqReqSurrenderPriorityInherit_Post_AddHelper_NA, + ScoreTqReqSurrenderPriorityInherit_Post_Suspended_NA }, +#else + { 0, 0, 0, 0, 0, 0, 0, 0, 0, + ScoreTqReqSurrenderPriorityInherit_Post_Dequeue_Priority, + ScoreTqReqSurrenderPriorityInherit_Post_Unblock_No, + ScoreTqReqSurrenderPriorityInherit_Post_PreviousOwnerPriority_Nop, + ScoreTqReqSurrenderPriorityInherit_Post_NewPriority_Raise, + ScoreTqReqSurrenderPriorityInherit_Post_RemoveHelper_No, ScoreTqReqSurrenderPriorityInherit_Post_AddHelper_No, ScoreTqReqSurrenderPriorityInherit_Post_Suspended_No }, #endif + { 0, 0, 0, 0, 0, 0, 0, 0, 0, + ScoreTqReqSurrenderPriorityInherit_Post_Dequeue_Priority, + ScoreTqReqSurrenderPriorityInherit_Post_Unblock_No, + ScoreTqReqSurrenderPriorityInherit_Post_PreviousOwnerPriority_Nop, + ScoreTqReqSurrenderPriorityInherit_Post_NewPriority_Nop, + ScoreTqReqSurrenderPriorityInherit_Post_RemoveHelper_No, + ScoreTqReqSurrenderPriorityInherit_Post_AddHelper_Yes, + ScoreTqReqSurrenderPriorityInherit_Post_Suspended_Yes }, #if !defined(RTEMS_SMP) - { 1, 0, 0, 0, 0, 0, 0, 0, ScoreTqReqSurrenderPriorityInherit_Post_Dequeue_NA, + { 1, 0, 0, 0, 0, 0, 0, 0, 0, + ScoreTqReqSurrenderPriorityInherit_Post_Dequeue_NA, ScoreTqReqSurrenderPriorityInherit_Post_Unblock_NA, ScoreTqReqSurrenderPriorityInherit_Post_PreviousOwnerPriority_NA, + ScoreTqReqSurrenderPriorityInherit_Post_NewPriority_NA, ScoreTqReqSurrenderPriorityInherit_Post_RemoveHelper_NA, ScoreTqReqSurrenderPriorityInherit_Post_AddHelper_NA, ScoreTqReqSurrenderPriorityInherit_Post_Suspended_NA }, #else - { 0, 0, 0, 0, 0, 0, 0, 0, + { 0, 0, 0, 0, 0, 0, 0, 0, 0, + ScoreTqReqSurrenderPriorityInherit_Post_Dequeue_Priority, + ScoreTqReqSurrenderPriorityInherit_Post_Unblock_No, + ScoreTqReqSurrenderPriorityInherit_Post_PreviousOwnerPriority_Nop, + ScoreTqReqSurrenderPriorityInherit_Post_NewPriority_Nop, + ScoreTqReqSurrenderPriorityInherit_Post_RemoveHelper_No, + ScoreTqReqSurrenderPriorityInherit_Post_AddHelper_Yes, + ScoreTqReqSurrenderPriorityInherit_Post_Suspended_Yes }, +#endif + { 0, 0, 0, 0, 0, 0, 0, 0, 0, ScoreTqReqSurrenderPriorityInherit_Post_Dequeue_Priority, ScoreTqReqSurrenderPriorityInherit_Post_Unblock_Yes, - ScoreTqReqSurrenderPriorityInherit_Post_PreviousOwnerPriority_Drop, + ScoreTqReqSurrenderPriorityInherit_Post_PreviousOwnerPriority_Nop, + ScoreTqReqSurrenderPriorityInherit_Post_NewPriority_Nop, ScoreTqReqSurrenderPriorityInherit_Post_RemoveHelper_No, ScoreTqReqSurrenderPriorityInherit_Post_AddHelper_Yes, ScoreTqReqSurrenderPriorityInherit_Post_Suspended_No }, -#endif #if !defined(RTEMS_SMP) - { 1, 0, 0, 0, 0, 0, 0, 0, ScoreTqReqSurrenderPriorityInherit_Post_Dequeue_NA, + { 1, 0, 0, 0, 0, 0, 0, 0, 0, + ScoreTqReqSurrenderPriorityInherit_Post_Dequeue_NA, ScoreTqReqSurrenderPriorityInherit_Post_Unblock_NA, ScoreTqReqSurrenderPriorityInherit_Post_PreviousOwnerPriority_NA, + ScoreTqReqSurrenderPriorityInherit_Post_NewPriority_NA, ScoreTqReqSurrenderPriorityInherit_Post_RemoveHelper_NA, ScoreTqReqSurrenderPriorityInherit_Post_AddHelper_NA, ScoreTqReqSurrenderPriorityInherit_Post_Suspended_NA }, #else - { 0, 0, 0, 0, 0, 0, 0, 0, + { 0, 0, 0, 0, 0, 0, 0, 0, 0, ScoreTqReqSurrenderPriorityInherit_Post_Dequeue_Priority, - ScoreTqReqSurrenderPriorityInherit_Post_Unblock_Yes, + ScoreTqReqSurrenderPriorityInherit_Post_Unblock_No, ScoreTqReqSurrenderPriorityInherit_Post_PreviousOwnerPriority_Nop, - ScoreTqReqSurrenderPriorityInherit_Post_RemoveHelper_Yes, + ScoreTqReqSurrenderPriorityInherit_Post_NewPriority_Nop, + ScoreTqReqSurrenderPriorityInherit_Post_RemoveHelper_No, ScoreTqReqSurrenderPriorityInherit_Post_AddHelper_Yes, ScoreTqReqSurrenderPriorityInherit_Post_Suspended_No }, #endif + { 0, 0, 0, 0, 0, 0, 0, 0, 0, + ScoreTqReqSurrenderPriorityInherit_Post_Dequeue_Priority, + ScoreTqReqSurrenderPriorityInherit_Post_Unblock_No, + ScoreTqReqSurrenderPriorityInherit_Post_PreviousOwnerPriority_Drop, + ScoreTqReqSurrenderPriorityInherit_Post_NewPriority_Raise, + ScoreTqReqSurrenderPriorityInherit_Post_RemoveHelper_Yes, + ScoreTqReqSurrenderPriorityInherit_Post_AddHelper_Yes, + ScoreTqReqSurrenderPriorityInherit_Post_Suspended_Yes }, #if !defined(RTEMS_SMP) - { 1, 0, 0, 0, 0, 0, 0, 0, ScoreTqReqSurrenderPriorityInherit_Post_Dequeue_NA, + { 1, 0, 0, 0, 0, 0, 0, 0, 0, + ScoreTqReqSurrenderPriorityInherit_Post_Dequeue_NA, ScoreTqReqSurrenderPriorityInherit_Post_Unblock_NA, ScoreTqReqSurrenderPriorityInherit_Post_PreviousOwnerPriority_NA, + ScoreTqReqSurrenderPriorityInherit_Post_NewPriority_NA, ScoreTqReqSurrenderPriorityInherit_Post_RemoveHelper_NA, ScoreTqReqSurrenderPriorityInherit_Post_AddHelper_NA, ScoreTqReqSurrenderPriorityInherit_Post_Suspended_NA }, #else - { 0, 0, 0, 0, 0, 0, 0, 0, + { 0, 0, 0, 0, 0, 0, 0, 0, 0, + ScoreTqReqSurrenderPriorityInherit_Post_Dequeue_Priority, + ScoreTqReqSurrenderPriorityInherit_Post_Unblock_No, + ScoreTqReqSurrenderPriorityInherit_Post_PreviousOwnerPriority_Drop, + ScoreTqReqSurrenderPriorityInherit_Post_NewPriority_Raise, + ScoreTqReqSurrenderPriorityInherit_Post_RemoveHelper_Yes, + ScoreTqReqSurrenderPriorityInherit_Post_AddHelper_Yes, + ScoreTqReqSurrenderPriorityInherit_Post_Suspended_Yes }, +#endif + { 0, 0, 0, 0, 0, 0, 0, 0, 0, ScoreTqReqSurrenderPriorityInherit_Post_Dequeue_Priority, ScoreTqReqSurrenderPriorityInherit_Post_Unblock_Yes, - ScoreTqReqSurrenderPriorityInherit_Post_PreviousOwnerPriority_Nop, + ScoreTqReqSurrenderPriorityInherit_Post_PreviousOwnerPriority_Drop, + ScoreTqReqSurrenderPriorityInherit_Post_NewPriority_Raise, ScoreTqReqSurrenderPriorityInherit_Post_RemoveHelper_Yes, - ScoreTqReqSurrenderPriorityInherit_Post_AddHelper_No, + ScoreTqReqSurrenderPriorityInherit_Post_AddHelper_Yes, ScoreTqReqSurrenderPriorityInherit_Post_Suspended_No }, -#endif #if !defined(RTEMS_SMP) - { 1, 0, 0, 0, 0, 0, 0, 0, ScoreTqReqSurrenderPriorityInherit_Post_Dequeue_NA, + { 1, 0, 0, 0, 0, 0, 0, 0, 0, + ScoreTqReqSurrenderPriorityInherit_Post_Dequeue_NA, ScoreTqReqSurrenderPriorityInherit_Post_Unblock_NA, ScoreTqReqSurrenderPriorityInherit_Post_PreviousOwnerPriority_NA, + ScoreTqReqSurrenderPriorityInherit_Post_NewPriority_NA, ScoreTqReqSurrenderPriorityInherit_Post_RemoveHelper_NA, ScoreTqReqSurrenderPriorityInherit_Post_AddHelper_NA, ScoreTqReqSurrenderPriorityInherit_Post_Suspended_NA }, #else - { 0, 0, 0, 0, 0, 0, 0, 0, + { 0, 0, 0, 0, 0, 0, 0, 0, 0, ScoreTqReqSurrenderPriorityInherit_Post_Dequeue_Priority, - ScoreTqReqSurrenderPriorityInherit_Post_Unblock_Yes, - ScoreTqReqSurrenderPriorityInherit_Post_PreviousOwnerPriority_Nop, - ScoreTqReqSurrenderPriorityInherit_Post_RemoveHelper_No, + ScoreTqReqSurrenderPriorityInherit_Post_Unblock_No, + ScoreTqReqSurrenderPriorityInherit_Post_PreviousOwnerPriority_Drop, + ScoreTqReqSurrenderPriorityInherit_Post_NewPriority_Raise, + ScoreTqReqSurrenderPriorityInherit_Post_RemoveHelper_Yes, ScoreTqReqSurrenderPriorityInherit_Post_AddHelper_Yes, ScoreTqReqSurrenderPriorityInherit_Post_Suspended_No }, #endif - { 0, 0, 0, 0, 0, 0, 0, 0, + { 0, 0, 0, 0, 0, 0, 0, 0, 0, ScoreTqReqSurrenderPriorityInherit_Post_Dequeue_Priority, ScoreTqReqSurrenderPriorityInherit_Post_Unblock_No, ScoreTqReqSurrenderPriorityInherit_Post_PreviousOwnerPriority_Drop, + ScoreTqReqSurrenderPriorityInherit_Post_NewPriority_Raise, ScoreTqReqSurrenderPriorityInherit_Post_RemoveHelper_No, - ScoreTqReqSurrenderPriorityInherit_Post_AddHelper_No, + ScoreTqReqSurrenderPriorityInherit_Post_AddHelper_Yes, + ScoreTqReqSurrenderPriorityInherit_Post_Suspended_Yes }, +#if !defined(RTEMS_SMP) + { 1, 0, 0, 0, 0, 0, 0, 0, 0, + ScoreTqReqSurrenderPriorityInherit_Post_Dequeue_NA, + ScoreTqReqSurrenderPriorityInherit_Post_Unblock_NA, + ScoreTqReqSurrenderPriorityInherit_Post_PreviousOwnerPriority_NA, + ScoreTqReqSurrenderPriorityInherit_Post_NewPriority_NA, + ScoreTqReqSurrenderPriorityInherit_Post_RemoveHelper_NA, + ScoreTqReqSurrenderPriorityInherit_Post_AddHelper_NA, + ScoreTqReqSurrenderPriorityInherit_Post_Suspended_NA }, +#else + { 0, 0, 0, 0, 0, 0, 0, 0, 0, + ScoreTqReqSurrenderPriorityInherit_Post_Dequeue_Priority, + ScoreTqReqSurrenderPriorityInherit_Post_Unblock_No, + ScoreTqReqSurrenderPriorityInherit_Post_PreviousOwnerPriority_Drop, + ScoreTqReqSurrenderPriorityInherit_Post_NewPriority_Raise, + ScoreTqReqSurrenderPriorityInherit_Post_RemoveHelper_No, + ScoreTqReqSurrenderPriorityInherit_Post_AddHelper_Yes, ScoreTqReqSurrenderPriorityInherit_Post_Suspended_Yes }, - { 0, 0, 0, 0, 0, 0, 0, 0, +#endif + { 0, 0, 0, 0, 0, 0, 0, 0, 0, ScoreTqReqSurrenderPriorityInherit_Post_Dequeue_Priority, ScoreTqReqSurrenderPriorityInherit_Post_Unblock_Yes, ScoreTqReqSurrenderPriorityInherit_Post_PreviousOwnerPriority_Drop, + ScoreTqReqSurrenderPriorityInherit_Post_NewPriority_Raise, ScoreTqReqSurrenderPriorityInherit_Post_RemoveHelper_No, - ScoreTqReqSurrenderPriorityInherit_Post_AddHelper_No, + ScoreTqReqSurrenderPriorityInherit_Post_AddHelper_Yes, ScoreTqReqSurrenderPriorityInherit_Post_Suspended_No }, #if !defined(RTEMS_SMP) - { 1, 0, 0, 0, 0, 0, 0, 0, ScoreTqReqSurrenderPriorityInherit_Post_Dequeue_NA, + { 1, 0, 0, 0, 0, 0, 0, 0, 0, + ScoreTqReqSurrenderPriorityInherit_Post_Dequeue_NA, ScoreTqReqSurrenderPriorityInherit_Post_Unblock_NA, ScoreTqReqSurrenderPriorityInherit_Post_PreviousOwnerPriority_NA, + ScoreTqReqSurrenderPriorityInherit_Post_NewPriority_NA, ScoreTqReqSurrenderPriorityInherit_Post_RemoveHelper_NA, ScoreTqReqSurrenderPriorityInherit_Post_AddHelper_NA, ScoreTqReqSurrenderPriorityInherit_Post_Suspended_NA }, #else - { 0, 0, 0, 0, 0, 0, 0, 0, + { 0, 0, 0, 0, 0, 0, 0, 0, 0, ScoreTqReqSurrenderPriorityInherit_Post_Dequeue_Priority, - ScoreTqReqSurrenderPriorityInherit_Post_Unblock_Yes, + ScoreTqReqSurrenderPriorityInherit_Post_Unblock_No, ScoreTqReqSurrenderPriorityInherit_Post_PreviousOwnerPriority_Drop, + ScoreTqReqSurrenderPriorityInherit_Post_NewPriority_Raise, ScoreTqReqSurrenderPriorityInherit_Post_RemoveHelper_No, - ScoreTqReqSurrenderPriorityInherit_Post_AddHelper_No, + ScoreTqReqSurrenderPriorityInherit_Post_AddHelper_Yes, + ScoreTqReqSurrenderPriorityInherit_Post_Suspended_No }, +#endif + { 0, 0, 0, 0, 0, 0, 0, 0, 0, + ScoreTqReqSurrenderPriorityInherit_Post_Dequeue_Priority, + ScoreTqReqSurrenderPriorityInherit_Post_Unblock_No, + ScoreTqReqSurrenderPriorityInherit_Post_PreviousOwnerPriority_Nop, + ScoreTqReqSurrenderPriorityInherit_Post_NewPriority_Raise, + ScoreTqReqSurrenderPriorityInherit_Post_RemoveHelper_Yes, + ScoreTqReqSurrenderPriorityInherit_Post_AddHelper_Yes, + ScoreTqReqSurrenderPriorityInherit_Post_Suspended_Yes }, +#if !defined(RTEMS_SMP) + { 1, 0, 0, 0, 0, 0, 0, 0, 0, + ScoreTqReqSurrenderPriorityInherit_Post_Dequeue_NA, + ScoreTqReqSurrenderPriorityInherit_Post_Unblock_NA, + ScoreTqReqSurrenderPriorityInherit_Post_PreviousOwnerPriority_NA, + ScoreTqReqSurrenderPriorityInherit_Post_NewPriority_NA, + ScoreTqReqSurrenderPriorityInherit_Post_RemoveHelper_NA, + ScoreTqReqSurrenderPriorityInherit_Post_AddHelper_NA, + ScoreTqReqSurrenderPriorityInherit_Post_Suspended_NA }, +#else + { 0, 0, 0, 0, 0, 0, 0, 0, 0, + ScoreTqReqSurrenderPriorityInherit_Post_Dequeue_Priority, + ScoreTqReqSurrenderPriorityInherit_Post_Unblock_No, + ScoreTqReqSurrenderPriorityInherit_Post_PreviousOwnerPriority_Nop, + ScoreTqReqSurrenderPriorityInherit_Post_NewPriority_Raise, + ScoreTqReqSurrenderPriorityInherit_Post_RemoveHelper_Yes, + ScoreTqReqSurrenderPriorityInherit_Post_AddHelper_Yes, + ScoreTqReqSurrenderPriorityInherit_Post_Suspended_Yes }, +#endif + { 0, 0, 0, 0, 0, 0, 0, 0, 0, + ScoreTqReqSurrenderPriorityInherit_Post_Dequeue_Priority, + ScoreTqReqSurrenderPriorityInherit_Post_Unblock_Yes, + ScoreTqReqSurrenderPriorityInherit_Post_PreviousOwnerPriority_Nop, + ScoreTqReqSurrenderPriorityInherit_Post_NewPriority_Raise, + ScoreTqReqSurrenderPriorityInherit_Post_RemoveHelper_Yes, + ScoreTqReqSurrenderPriorityInherit_Post_AddHelper_Yes, + ScoreTqReqSurrenderPriorityInherit_Post_Suspended_No }, +#if !defined(RTEMS_SMP) + { 1, 0, 0, 0, 0, 0, 0, 0, 0, + ScoreTqReqSurrenderPriorityInherit_Post_Dequeue_NA, + ScoreTqReqSurrenderPriorityInherit_Post_Unblock_NA, + ScoreTqReqSurrenderPriorityInherit_Post_PreviousOwnerPriority_NA, + ScoreTqReqSurrenderPriorityInherit_Post_NewPriority_NA, + ScoreTqReqSurrenderPriorityInherit_Post_RemoveHelper_NA, + ScoreTqReqSurrenderPriorityInherit_Post_AddHelper_NA, + ScoreTqReqSurrenderPriorityInherit_Post_Suspended_NA }, +#else + { 0, 0, 0, 0, 0, 0, 0, 0, 0, + ScoreTqReqSurrenderPriorityInherit_Post_Dequeue_Priority, + ScoreTqReqSurrenderPriorityInherit_Post_Unblock_No, + ScoreTqReqSurrenderPriorityInherit_Post_PreviousOwnerPriority_Nop, + ScoreTqReqSurrenderPriorityInherit_Post_NewPriority_Raise, + ScoreTqReqSurrenderPriorityInherit_Post_RemoveHelper_Yes, + ScoreTqReqSurrenderPriorityInherit_Post_AddHelper_Yes, ScoreTqReqSurrenderPriorityInherit_Post_Suspended_No }, #endif - { 0, 0, 0, 0, 0, 0, 0, 0, + { 0, 0, 0, 0, 0, 0, 0, 0, 0, ScoreTqReqSurrenderPriorityInherit_Post_Dequeue_Priority, ScoreTqReqSurrenderPriorityInherit_Post_Unblock_No, ScoreTqReqSurrenderPriorityInherit_Post_PreviousOwnerPriority_Nop, + ScoreTqReqSurrenderPriorityInherit_Post_NewPriority_Raise, ScoreTqReqSurrenderPriorityInherit_Post_RemoveHelper_No, - ScoreTqReqSurrenderPriorityInherit_Post_AddHelper_No, + ScoreTqReqSurrenderPriorityInherit_Post_AddHelper_Yes, + ScoreTqReqSurrenderPriorityInherit_Post_Suspended_Yes }, +#if !defined(RTEMS_SMP) + { 1, 0, 0, 0, 0, 0, 0, 0, 0, + ScoreTqReqSurrenderPriorityInherit_Post_Dequeue_NA, + ScoreTqReqSurrenderPriorityInherit_Post_Unblock_NA, + ScoreTqReqSurrenderPriorityInherit_Post_PreviousOwnerPriority_NA, + ScoreTqReqSurrenderPriorityInherit_Post_NewPriority_NA, + ScoreTqReqSurrenderPriorityInherit_Post_RemoveHelper_NA, + ScoreTqReqSurrenderPriorityInherit_Post_AddHelper_NA, + ScoreTqReqSurrenderPriorityInherit_Post_Suspended_NA }, +#else + { 0, 0, 0, 0, 0, 0, 0, 0, 0, + ScoreTqReqSurrenderPriorityInherit_Post_Dequeue_Priority, + ScoreTqReqSurrenderPriorityInherit_Post_Unblock_No, + ScoreTqReqSurrenderPriorityInherit_Post_PreviousOwnerPriority_Nop, + ScoreTqReqSurrenderPriorityInherit_Post_NewPriority_Raise, + ScoreTqReqSurrenderPriorityInherit_Post_RemoveHelper_No, + ScoreTqReqSurrenderPriorityInherit_Post_AddHelper_Yes, ScoreTqReqSurrenderPriorityInherit_Post_Suspended_Yes }, - { 0, 0, 0, 0, 0, 0, 0, 0, +#endif + { 0, 0, 0, 0, 0, 0, 0, 0, 0, ScoreTqReqSurrenderPriorityInherit_Post_Dequeue_Priority, ScoreTqReqSurrenderPriorityInherit_Post_Unblock_Yes, ScoreTqReqSurrenderPriorityInherit_Post_PreviousOwnerPriority_Nop, + ScoreTqReqSurrenderPriorityInherit_Post_NewPriority_Raise, ScoreTqReqSurrenderPriorityInherit_Post_RemoveHelper_No, - ScoreTqReqSurrenderPriorityInherit_Post_AddHelper_No, + ScoreTqReqSurrenderPriorityInherit_Post_AddHelper_Yes, ScoreTqReqSurrenderPriorityInherit_Post_Suspended_No }, #if !defined(RTEMS_SMP) - { 1, 0, 0, 0, 0, 0, 0, 0, ScoreTqReqSurrenderPriorityInherit_Post_Dequeue_NA, + { 1, 0, 0, 0, 0, 0, 0, 0, 0, + ScoreTqReqSurrenderPriorityInherit_Post_Dequeue_NA, ScoreTqReqSurrenderPriorityInherit_Post_Unblock_NA, ScoreTqReqSurrenderPriorityInherit_Post_PreviousOwnerPriority_NA, + ScoreTqReqSurrenderPriorityInherit_Post_NewPriority_NA, ScoreTqReqSurrenderPriorityInherit_Post_RemoveHelper_NA, ScoreTqReqSurrenderPriorityInherit_Post_AddHelper_NA, ScoreTqReqSurrenderPriorityInherit_Post_Suspended_NA } #else - { 0, 0, 0, 0, 0, 0, 0, 0, + { 0, 0, 0, 0, 0, 0, 0, 0, 0, ScoreTqReqSurrenderPriorityInherit_Post_Dequeue_Priority, - ScoreTqReqSurrenderPriorityInherit_Post_Unblock_Yes, + ScoreTqReqSurrenderPriorityInherit_Post_Unblock_No, ScoreTqReqSurrenderPriorityInherit_Post_PreviousOwnerPriority_Nop, + ScoreTqReqSurrenderPriorityInherit_Post_NewPriority_Raise, ScoreTqReqSurrenderPriorityInherit_Post_RemoveHelper_No, - ScoreTqReqSurrenderPriorityInherit_Post_AddHelper_No, + ScoreTqReqSurrenderPriorityInherit_Post_AddHelper_Yes, ScoreTqReqSurrenderPriorityInherit_Post_Suspended_No } #endif }; static const uint8_t ScoreTqReqSurrenderPriorityInherit_Map[] = { - 1, 1, 18, 9, 2, 2, 19, 10, 1, 1, 18, 9, 2, 2, 19, 10, 3, 3, 20, 11, 24, 7, - 25, 12, 3, 3, 20, 11, 7, 7, 26, 12, 4, 4, 21, 13, 5, 5, 22, 14, 4, 4, 21, 13, - 5, 5, 22, 14, 6, 6, 23, 15, 27, 8, 28, 16, 6, 6, 23, 15, 8, 8, 29, 16, 0, 1, - 0, 9, 0, 2, 0, 10, 0, 1, 0, 9, 0, 2, 0, 10, 0, 3, 0, 11, 17, 7, 17, 12, 0, 3, - 0, 11, 0, 7, 0, 12, 0, 4, 0, 13, 0, 5, 0, 14, 0, 4, 0, 13, 0, 5, 0, 14, 0, 6, - 0, 15, 17, 8, 17, 16, 0, 6, 0, 15, 0, 8, 0, 16 + 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, + 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 4, 5, 6, 7, 0, 1, 0, 1, + 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, + 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, + 0, 1, 0, 1, 8, 9, 10, 11, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 2, + 3, 2, 3, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 2, 3, 2, 3, 12, 13, + 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 2, 3, 2, 3, 24, 25, 26, 27, 28, 29, + 30, 31, 4, 5, 6, 7, 2, 3, 2, 3, 24, 25, 26, 27, 28, 29, 30, 31, 4, 5, 6, 7, + 2, 3, 2, 3, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 2, 3, 2, 3, 32, + 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 2, 3, 2, 3, 44, 45, 46, 47, 48, + 49, 50, 51, 8, 9, 10, 11, 2, 3, 2, 3, 44, 45, 46, 47, 48, 49, 50, 51, 8, 9, + 10, 11, 52, 53, 54, 55, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 52, + 53, 54, 55, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 56, 57, 58, 59, + 24, 25, 26, 27, 28, 29, 30, 31, 4, 5, 6, 7, 56, 57, 58, 59, 24, 25, 26, 27, + 28, 29, 30, 31, 4, 5, 6, 7, 60, 61, 62, 63, 32, 33, 34, 35, 36, 37, 38, 39, + 40, 41, 42, 43, 60, 61, 62, 63, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, + 43, 64, 65, 66, 67, 44, 45, 46, 47, 48, 49, 50, 51, 8, 9, 10, 11, 64, 65, 66, + 67, 44, 45, 46, 47, 48, 49, 50, 51, 8, 9, 10, 11 }; static size_t ScoreTqReqSurrenderPriorityInherit_Scope( @@ -1599,7 +2301,7 @@ static T_fixture ScoreTqReqSurrenderPriorityInherit_Fixture = { }; static const uint8_t ScoreTqReqSurrenderPriorityInherit_Weights[] = { - 64, 32, 16, 8, 4, 2, 1 + 128, 64, 32, 16, 8, 4, 2, 1 }; static void ScoreTqReqSurrenderPriorityInherit_Skip( @@ -1615,16 +2317,19 @@ static void ScoreTqReqSurrenderPriorityInherit_Skip( ctx->Map.pcs[ 2 ] = ScoreTqReqSurrenderPriorityInherit_Pre_PreviousHelping_NA - 1; /* Fall through */ case 3: - ctx->Map.pcs[ 3 ] = ScoreTqReqSurrenderPriorityInherit_Pre_Scheduler_NA - 1; + ctx->Map.pcs[ 3 ] = ScoreTqReqSurrenderPriorityInherit_Pre_UsedScheduler_NA - 1; /* Fall through */ case 4: - ctx->Map.pcs[ 4 ] = ScoreTqReqSurrenderPriorityInherit_Pre_NewHelping_NA - 1; + ctx->Map.pcs[ 4 ] = ScoreTqReqSurrenderPriorityInherit_Pre_NewPriority_NA - 1; /* Fall through */ case 5: - ctx->Map.pcs[ 5 ] = ScoreTqReqSurrenderPriorityInherit_Pre_Suspended_NA - 1; + ctx->Map.pcs[ 5 ] = ScoreTqReqSurrenderPriorityInherit_Pre_NewHelping_NA - 1; /* Fall through */ case 6: - ctx->Map.pcs[ 6 ] = ScoreTqReqSurrenderPriorityInherit_Pre_WaitState_NA - 1; + ctx->Map.pcs[ 6 ] = ScoreTqReqSurrenderPriorityInherit_Pre_Suspended_NA - 1; + /* Fall through */ + case 7: + ctx->Map.pcs[ 7 ] = ScoreTqReqSurrenderPriorityInherit_Pre_WaitState_NA - 1; break; } } @@ -1642,7 +2347,7 @@ ScoreTqReqSurrenderPriorityInherit_PopEntry( ctx->Map.skip = false; index = 0; - for ( i = 0; i < 7; ++i ) { + for ( i = 0; i < 8; ++i ) { index += ScoreTqReqSurrenderPriorityInherit_Weights[ i ] * ctx->Map.pcs[ i ]; } } else { @@ -1660,7 +2365,7 @@ static void ScoreTqReqSurrenderPriorityInherit_TestVariant( ScoreTqReqSurrenderPriorityInherit_Context *ctx ) { - ScoreTqReqSurrenderPriorityInherit_Pre_EnqueueVariant_Prepare( + ScoreTqReqSurrenderPriorityInherit_Pre_SchedulerCount_Prepare( ctx, ctx->Map.pcs[ 0 ] ); @@ -1678,22 +2383,26 @@ static void ScoreTqReqSurrenderPriorityInherit_TestVariant( ctx, ctx->Map.pcs[ 2 ] ); - ScoreTqReqSurrenderPriorityInherit_Pre_Scheduler_Prepare( + ScoreTqReqSurrenderPriorityInherit_Pre_UsedScheduler_Prepare( ctx, ctx->Map.pcs[ 3 ] ); - ScoreTqReqSurrenderPriorityInherit_Pre_NewHelping_Prepare( + ScoreTqReqSurrenderPriorityInherit_Pre_NewPriority_Prepare( ctx, ctx->Map.pcs[ 4 ] ); - ScoreTqReqSurrenderPriorityInherit_Pre_Suspended_Prepare( + ScoreTqReqSurrenderPriorityInherit_Pre_NewHelping_Prepare( ctx, ctx->Map.pcs[ 5 ] ); - ScoreTqReqSurrenderPriorityInherit_Pre_WaitState_Prepare( + ScoreTqReqSurrenderPriorityInherit_Pre_Suspended_Prepare( ctx, ctx->Map.pcs[ 6 ] ); + ScoreTqReqSurrenderPriorityInherit_Pre_WaitState_Prepare( + ctx, + ctx->Map.pcs[ 7 ] + ); ScoreTqReqSurrenderPriorityInherit_Action( ctx ); ScoreTqReqSurrenderPriorityInherit_Post_Dequeue_Check( ctx, @@ -1707,6 +2416,10 @@ static void ScoreTqReqSurrenderPriorityInherit_TestVariant( ctx, ctx->Map.entry.Post_PreviousOwnerPriority ); + ScoreTqReqSurrenderPriorityInherit_Post_NewPriority_Check( + ctx, + ctx->Map.entry.Post_NewPriority + ); ScoreTqReqSurrenderPriorityInherit_Post_RemoveHelper_Check( ctx, ctx->Map.entry.Post_RemoveHelper @@ -1739,8 +2452,8 @@ void ScoreTqReqSurrenderPriorityInherit_Run( TQContext *tq_ctx ) ctx->Map.skip = false; for ( - ctx->Map.pcs[ 0 ] = ScoreTqReqSurrenderPriorityInherit_Pre_EnqueueVariant_Blocking; - ctx->Map.pcs[ 0 ] < ScoreTqReqSurrenderPriorityInherit_Pre_EnqueueVariant_NA; + ctx->Map.pcs[ 0 ] = ScoreTqReqSurrenderPriorityInherit_Pre_SchedulerCount_One; + ctx->Map.pcs[ 0 ] < ScoreTqReqSurrenderPriorityInherit_Pre_SchedulerCount_NA; ++ctx->Map.pcs[ 0 ] ) { for ( @@ -1754,36 +2467,42 @@ void ScoreTqReqSurrenderPriorityInherit_Run( TQContext *tq_ctx ) ++ctx->Map.pcs[ 2 ] ) { for ( - ctx->Map.pcs[ 3 ] = ScoreTqReqSurrenderPriorityInherit_Pre_Scheduler_Home; - ctx->Map.pcs[ 3 ] < ScoreTqReqSurrenderPriorityInherit_Pre_Scheduler_NA; + ctx->Map.pcs[ 3 ] = ScoreTqReqSurrenderPriorityInherit_Pre_UsedScheduler_Home; + ctx->Map.pcs[ 3 ] < ScoreTqReqSurrenderPriorityInherit_Pre_UsedScheduler_NA; ++ctx->Map.pcs[ 3 ] ) { for ( - ctx->Map.pcs[ 4 ] = ScoreTqReqSurrenderPriorityInherit_Pre_NewHelping_Vital; - ctx->Map.pcs[ 4 ] < ScoreTqReqSurrenderPriorityInherit_Pre_NewHelping_NA; + ctx->Map.pcs[ 4 ] = ScoreTqReqSurrenderPriorityInherit_Pre_NewPriority_Vital; + ctx->Map.pcs[ 4 ] < ScoreTqReqSurrenderPriorityInherit_Pre_NewPriority_NA; ++ctx->Map.pcs[ 4 ] ) { for ( - ctx->Map.pcs[ 5 ] = ScoreTqReqSurrenderPriorityInherit_Pre_Suspended_Yes; - ctx->Map.pcs[ 5 ] < ScoreTqReqSurrenderPriorityInherit_Pre_Suspended_NA; + ctx->Map.pcs[ 5 ] = ScoreTqReqSurrenderPriorityInherit_Pre_NewHelping_Vital; + ctx->Map.pcs[ 5 ] < ScoreTqReqSurrenderPriorityInherit_Pre_NewHelping_NA; ++ctx->Map.pcs[ 5 ] ) { for ( - ctx->Map.pcs[ 6 ] = ScoreTqReqSurrenderPriorityInherit_Pre_WaitState_Blocked; - ctx->Map.pcs[ 6 ] < ScoreTqReqSurrenderPriorityInherit_Pre_WaitState_NA; + ctx->Map.pcs[ 6 ] = ScoreTqReqSurrenderPriorityInherit_Pre_Suspended_Yes; + ctx->Map.pcs[ 6 ] < ScoreTqReqSurrenderPriorityInherit_Pre_Suspended_NA; ++ctx->Map.pcs[ 6 ] ) { - ctx->Map.entry = ScoreTqReqSurrenderPriorityInherit_PopEntry( - ctx - ); - - if ( ctx->Map.entry.Skip ) { - continue; + for ( + ctx->Map.pcs[ 7 ] = ScoreTqReqSurrenderPriorityInherit_Pre_WaitState_Blocked; + ctx->Map.pcs[ 7 ] < ScoreTqReqSurrenderPriorityInherit_Pre_WaitState_NA; + ++ctx->Map.pcs[ 7 ] + ) { + ctx->Map.entry = ScoreTqReqSurrenderPriorityInherit_PopEntry( + ctx + ); + + if ( ctx->Map.entry.Skip ) { + continue; + } + + ScoreTqReqSurrenderPriorityInherit_Prepare( ctx ); + ScoreTqReqSurrenderPriorityInherit_TestVariant( ctx ); + ScoreTqReqSurrenderPriorityInherit_Cleanup( ctx ); } - - ScoreTqReqSurrenderPriorityInherit_Prepare( ctx ); - ScoreTqReqSurrenderPriorityInherit_TestVariant( ctx ); - ScoreTqReqSurrenderPriorityInherit_Cleanup( ctx ); } } } diff --git a/testsuites/validation/tr-tq-surrender-priority-inherit.h b/testsuites/validation/tr-tq-surrender-priority-inherit.h index 57129a30eb..b792de1b2e 100644 --- a/testsuites/validation/tr-tq-surrender-priority-inherit.h +++ b/testsuites/validation/tr-tq-surrender-priority-inherit.h @@ -64,10 +64,11 @@ extern "C" { */ typedef enum { - ScoreTqReqSurrenderPriorityInherit_Pre_EnqueueVariant_Blocking, - ScoreTqReqSurrenderPriorityInherit_Pre_EnqueueVariant_Sticky, - ScoreTqReqSurrenderPriorityInherit_Pre_EnqueueVariant_NA -} ScoreTqReqSurrenderPriorityInherit_Pre_EnqueueVariant; + ScoreTqReqSurrenderPriorityInherit_Pre_SchedulerCount_One, + ScoreTqReqSurrenderPriorityInherit_Pre_SchedulerCount_Two, + ScoreTqReqSurrenderPriorityInherit_Pre_SchedulerCount_More, + ScoreTqReqSurrenderPriorityInherit_Pre_SchedulerCount_NA +} ScoreTqReqSurrenderPriorityInherit_Pre_SchedulerCount; typedef enum { ScoreTqReqSurrenderPriorityInherit_Pre_InheritedPriority_Vital, @@ -82,10 +83,16 @@ typedef enum { } ScoreTqReqSurrenderPriorityInherit_Pre_PreviousHelping; typedef enum { - ScoreTqReqSurrenderPriorityInherit_Pre_Scheduler_Home, - ScoreTqReqSurrenderPriorityInherit_Pre_Scheduler_Helping, - ScoreTqReqSurrenderPriorityInherit_Pre_Scheduler_NA -} ScoreTqReqSurrenderPriorityInherit_Pre_Scheduler; + ScoreTqReqSurrenderPriorityInherit_Pre_UsedScheduler_Home, + ScoreTqReqSurrenderPriorityInherit_Pre_UsedScheduler_Helping, + ScoreTqReqSurrenderPriorityInherit_Pre_UsedScheduler_NA +} ScoreTqReqSurrenderPriorityInherit_Pre_UsedScheduler; + +typedef enum { + ScoreTqReqSurrenderPriorityInherit_Pre_NewPriority_Vital, + ScoreTqReqSurrenderPriorityInherit_Pre_NewPriority_Dispensable, + ScoreTqReqSurrenderPriorityInherit_Pre_NewPriority_NA +} ScoreTqReqSurrenderPriorityInherit_Pre_NewPriority; typedef enum { ScoreTqReqSurrenderPriorityInherit_Pre_NewHelping_Vital, @@ -123,6 +130,12 @@ typedef enum { } ScoreTqReqSurrenderPriorityInherit_Post_PreviousOwnerPriority; typedef enum { + ScoreTqReqSurrenderPriorityInherit_Post_NewPriority_Raise, + ScoreTqReqSurrenderPriorityInherit_Post_NewPriority_Nop, + ScoreTqReqSurrenderPriorityInherit_Post_NewPriority_NA +} ScoreTqReqSurrenderPriorityInherit_Post_NewPriority; + +typedef enum { ScoreTqReqSurrenderPriorityInherit_Post_RemoveHelper_Yes, ScoreTqReqSurrenderPriorityInherit_Post_RemoveHelper_No, ScoreTqReqSurrenderPriorityInherit_Post_RemoveHelper_NA |