[rtems-central commit] spec: Move TQ get owner to base context

Sebastian Huber sebh at rtems.org
Tue Aug 31 05:08:04 UTC 2021


Module:    rtems-central
Branch:    master
Commit:    a6bba0d9928ca5b0db08ce0de07475de04f0956d
Changeset: http://git.rtems.org/rtems-central/commit/?id=a6bba0d9928ca5b0db08ce0de07475de04f0956d

Author:    Sebastian Huber <sebastian.huber at embedded-brains.de>
Date:      Tue Aug 17 17:27:43 2021 +0200

spec: Move TQ get owner to base context

---

 spec/rtems/sem/req/obtain.yml     | 7 +------
 spec/score/mtx/req/seize-try.yml  | 2 +-
 spec/score/mtx/req/seize-wait.yml | 2 +-
 3 files changed, 3 insertions(+), 8 deletions(-)

diff --git a/spec/rtems/sem/req/obtain.yml b/spec/rtems/sem/req/obtain.yml
index 4dc08b4..9ae2650 100644
--- a/spec/rtems/sem/req/obtain.yml
+++ b/spec/rtems/sem/req/obtain.yml
@@ -37,7 +37,6 @@ post-conditions:
       ctx->tq_mtx_ctx.base.enqueue_variant = TQ_ENQUEUE_BLOCKS;
       ctx->tq_mtx_ctx.recursive = TQ_MTX_RECURSIVE_YES;
       ctx->tq_mtx_ctx.priority_ceiling = PRIO_INVALID;
-      ctx->tq_mtx_ctx.get_owner = TQMtxGetOwnerClassic;
       ${/score/mtx/req/seize-try:/test-run}( &ctx->tq_mtx_ctx );
     text: |
       The calling task shall try to seize the mutex as specified by
@@ -48,7 +47,6 @@ post-conditions:
       ctx->tq_mtx_ctx.base.enqueue_variant = TQ_ENQUEUE_BLOCKS;
       ctx->tq_mtx_ctx.recursive = TQ_MTX_RECURSIVE_YES;
       ctx->tq_mtx_ctx.priority_ceiling = PRIO_INVALID;
-      ctx->tq_mtx_ctx.get_owner = TQMtxGetOwnerClassic;
       ${/score/mtx/req/seize-wait:/test-run}( &ctx->tq_mtx_ctx );
     text: |
       The calling task shall wait to seize the mutex as specified by
@@ -59,7 +57,6 @@ post-conditions:
       ctx->tq_mtx_ctx.base.enqueue_variant = TQ_ENQUEUE_BLOCKS;
       ctx->tq_mtx_ctx.recursive = TQ_MTX_RECURSIVE_YES;
       ctx->tq_mtx_ctx.priority_ceiling = PRIO_VERY_HIGH;
-      ctx->tq_mtx_ctx.get_owner = TQMtxGetOwnerClassic;
       ${/score/mtx/req/seize-try:/test-run}( &ctx->tq_mtx_ctx );
     text: |
       The calling task shall try to seize the mutex as specified by
@@ -70,7 +67,6 @@ post-conditions:
       ctx->tq_mtx_ctx.base.enqueue_variant = TQ_ENQUEUE_BLOCKS;
       ctx->tq_mtx_ctx.recursive = TQ_MTX_RECURSIVE_YES;
       ctx->tq_mtx_ctx.priority_ceiling = PRIO_VERY_HIGH;
-      ctx->tq_mtx_ctx.get_owner = TQMtxGetOwnerClassic;
       ${/score/mtx/req/seize-wait:/test-run}( &ctx->tq_mtx_ctx );
     text: |
       The calling task shall wait to seize the mutex as specified by
@@ -81,7 +77,6 @@ post-conditions:
       ctx->tq_mtx_ctx.base.enqueue_variant = TQ_ENQUEUE_STICKY;
       ctx->tq_mtx_ctx.recursive = TQ_MTX_RECURSIVE_NO_STATUS;
       ctx->tq_mtx_ctx.priority_ceiling = PRIO_VERY_HIGH;
-      ctx->tq_mtx_ctx.get_owner = TQMtxGetOwnerClassic;
       ${/score/mtx/req/seize-try:/test-run}( &ctx->tq_mtx_ctx );
     text: |
       The calling task shall try to seize the mutex as specified by
@@ -92,7 +87,6 @@ post-conditions:
       ctx->tq_mtx_ctx.base.enqueue_variant = TQ_ENQUEUE_STICKY;
       ctx->tq_mtx_ctx.recursive = TQ_MTX_RECURSIVE_NO_STATUS;
       ctx->tq_mtx_ctx.priority_ceiling = PRIO_VERY_HIGH;
-      ctx->tq_mtx_ctx.get_owner = TQMtxGetOwnerClassic;
       ${/score/mtx/req/seize-wait:/test-run}( &ctx->tq_mtx_ctx );
     text: |
       The calling task shall wait to seize the mutex as specified by
@@ -258,6 +252,7 @@ test-setup:
     memset( ctx, 0, sizeof( *ctx ) );
     ctx->tq_ctx.enqueue = TQEnqueueClassicSem;
     ctx->tq_ctx.surrender = TQSurrenderClassicSem;
+    ctx->tq_ctx.get_owner = TQGetOwnerClassicSem;
     ctx->tq_ctx.convert_status = TQConvertStatusClassic;
     TQInitialize( &ctx->tq_ctx );
   description: null
diff --git a/spec/score/mtx/req/seize-try.yml b/spec/score/mtx/req/seize-try.yml
index 7e1f04f..6277339 100644
--- a/spec/score/mtx/req/seize-try.yml
+++ b/spec/score/mtx/req/seize-try.yml
@@ -210,7 +210,7 @@ test-action: |
   }
 
   ctx->status = TQEnqueue( &ctx->tq_ctx->base, TQ_NO_WAIT );
-  ctx->owner_after = TQMtxGetOwner( ctx->tq_ctx );
+  ctx->owner_after = TQGetOwner( &ctx->tq_ctx->base );
   ctx->priority_after = GetSelfPriority();
 
   if ( ctx->owner_caller ) {
diff --git a/spec/score/mtx/req/seize-wait.yml b/spec/score/mtx/req/seize-wait.yml
index 53dd245..17c4f65 100644
--- a/spec/score/mtx/req/seize-wait.yml
+++ b/spec/score/mtx/req/seize-wait.yml
@@ -353,7 +353,7 @@ test-support: |
     }
 
     ctx->status = TQEnqueue( &ctx->tq_ctx->base, TQ_NO_WAIT );
-    ctx->owner_after = TQMtxGetOwner( ctx->tq_ctx );
+    ctx->owner_after = TQGetOwner( &ctx->tq_ctx->base );
     ctx->priority_after = GetSelfPriority();
 
     if ( ctx->owner_caller ) {



More information about the vc mailing list