[rtems-central commit] spec: Specify RTEMS_SELF

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


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

Author:    Sebastian Huber <sebastian.huber at embedded-brains.de>
Date:      Thu Nov 18 08:32:12 2021 +0100

spec: Specify RTEMS_SELF

---

 spec/rtems/task/req/self-define.yml | 43 +++++++++++++++++++++++++++++++++++++
 spec/rtems/task/val/task.yml        | 15 +++++++++++++
 2 files changed, 58 insertions(+)

diff --git a/spec/rtems/task/req/self-define.yml b/spec/rtems/task/req/self-define.yml
new file mode 100644
index 0000000..c3f8a37
--- /dev/null
+++ b/spec/rtems/task/req/self-define.yml
@@ -0,0 +1,43 @@
+SPDX-License-Identifier: CC-BY-SA-4.0
+copyrights:
+- Copyright (C) 2021 embedded brains GmbH (http://www.embedded-brains.de)
+enabled-by: true
+links:
+- role: interface-function
+  uid: ../if/self-define
+- role: interface-function
+  uid: ../if/delete
+- role: interface-function
+  uid: ../if/get-affinity
+- role: interface-function
+  uid: ../if/get-priority
+- role: interface-function
+  uid: ../if/get-scheduler
+- role: interface-function
+  uid: ../if/is-suspended
+- role: interface-function
+  uid: ../if/restart
+- role: interface-function
+  uid: ../if/resume
+- role: interface-function
+  uid: ../if/set-affinity
+- role: interface-function
+  uid: ../if/set-priority
+- role: interface-function
+  uid: ../if/set-scheduler
+- role: interface-function
+  uid: ../if/suspend
+- role: interface-function
+  uid: ../../event/if/send
+- role: interface-function
+  uid: ../../event/if/system-send
+- role: interface-function
+  uid: ../../signal/if/send
+functional-type: function
+rationale: null
+references: []
+requirement-type: functional
+text: |
+  While the ${../if/self-define:/name} constant is used as a task identifier
+  parameter in a directive call, it shall be associated with the calling task.
+type: requirement
diff --git a/spec/rtems/task/val/task.yml b/spec/rtems/task/val/task.yml
index 36c0046..aa29cfe 100644
--- a/spec/rtems/task/val/task.yml
+++ b/spec/rtems/task/val/task.yml
@@ -101,6 +101,21 @@ test-actions:
   links:
   - role: validation
     uid: ../req/storage-alignment
+- action-brief: |
+    Validate ${../if/self-define:/name} using a sample directive call.
+  action-code: |
+    rtems_status_code sc;
+  checks:
+  - brief: |
+      Check that ${../if/is-suspended:/name} returns the expected status if
+      called with a task identifier parameter of ${../if/self-define:/name}.
+    code: |
+      sc = rtems_task_is_suspended( RTEMS_SELF );
+      T_step_rsc_success( ${step}, sc );
+    links:
+    - role: validation
+      uid: ../req/self-define
+  links: []
 test-brief: |
   This test case collection provides validation test cases for requirements of
   the ${../if/group:/name}.



More information about the vc mailing list