[rtems-central commit] spec: Use RTEMS_WHO_AM_I for rtems_task_ident()

Sebastian Huber sebh at rtems.org
Fri Nov 19 07:51:57 UTC 2021


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

Author:    Sebastian Huber <sebastian.huber at embedded-brains.de>
Date:      Thu Nov 18 09:46:34 2021 +0100

spec: Use RTEMS_WHO_AM_I for rtems_task_ident()

---

 spec/rtems/task/if/ident.yml  |  4 ++--
 spec/rtems/task/req/ident.yml | 27 ++++++++++++++++-----------
 2 files changed, 18 insertions(+), 13 deletions(-)

diff --git a/spec/rtems/task/if/ident.yml b/spec/rtems/task/if/ident.yml
index 1b4e67a..c739e0b 100644
--- a/spec/rtems/task/if/ident.yml
+++ b/spec/rtems/task/if/ident.yml
@@ -18,8 +18,8 @@ description: |
   This directive obtains a task identifier associated with the task name
   specified in ${.:/params[0]/name}.
 
-  A task may obtain its own identifier by specifying ${self-define:/name} for
-  the name.
+  A task may obtain its own identifier by specifying
+  ${../../object/if/who-am-i:/name} for the name.
 
   The node to search is specified in ${.:/params[1]/name}.  It shall be
 
diff --git a/spec/rtems/task/req/ident.yml b/spec/rtems/task/req/ident.yml
index 964c653..17b2b52 100644
--- a/spec/rtems/task/req/ident.yml
+++ b/spec/rtems/task/req/ident.yml
@@ -6,10 +6,12 @@ functional-type: action
 links:
 - role: interface-function
   uid: ../if/ident
+- role: interface-function
+  uid: ../../object/if/who-am-i
 post-conditions:
 - name: Status
   states:
-  - name: OkAndSelfId
+  - name: OkAndWhoAmI
     test-code: |
       T_rsc( ctx->status, RTEMS_SUCCESSFUL );
       T_eq_ptr( ctx->id, &ctx->id_value );
@@ -29,21 +31,24 @@ post-conditions:
 pre-conditions:
 - name: Name
   states:
-  - name: Self
+  - name: WhoAmI
     test-code: |
       ctx->id_value = 0xffffffff;
       ctx->id = &ctx->id_value;
     text: |
-      While the ${../if/ident:/params[0]/name} parameter is
-      ${../if/self:/name}.
-  - name: NotSelf
+      While the ${../if/ident:/params[0]/name} parameter is equal to
+      ${../../object/if/who-am-i:/name},
+      while ${../if/ident:/params[2]/name} parameter is not equal to
+      ${/c/if/null:/name}.
+  - name: NotWhoAmI
     test-code: |
       ctx->id = NULL;
       /* Preparation performed by ${../../req/ident:/test-run}() */
     text: |
-      While the ${../if/ident:/params[0]/name} is not ${../if/self:/name} or
-      ${../if/ident:/params[2]/name} parameter is ${/c/if/null:/name}, the
-      behaviour of ${../if/ident:/name} shall be specified by
+      While the ${../if/ident:/params[0]/name} is not equal to
+      ${../../object/if/who-am-i:/name} or ${../if/ident:/params[2]/name}
+      parameter is equal to ${/c/if/null:/name},
+      the behaviour of ${../if/ident:/name} shall be specified by
       ${../../req/ident}.
   test-epilogue: null
   test-prologue: null
@@ -141,14 +146,14 @@ text: ${.:text-template}
 transition-map:
 - enabled-by: true
   post-conditions:
-    Status: OkAndSelfId
+    Status: OkAndWhoAmI
   pre-conditions:
     Name:
-    - Self
+    - WhoAmI
 - enabled-by: true
   post-conditions:
     Status: Skip
   pre-conditions:
     Name:
-    - NotSelf
+    - NotWhoAmI
 type: requirement



More information about the vc mailing list