[rtems-central commit] spec: Add requirement for RTEMS_NO_TIMEOUT

Sebastian Huber sebh at rtems.org
Tue May 9 13:45:27 UTC 2023


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

Author:    Sebastian Huber <sebastian.huber at embedded-brains.de>
Date:      Fri May  5 14:41:20 2023 +0200

spec: Add requirement for RTEMS_NO_TIMEOUT

---

 spec/rtems/barrier/req/wait.yml       |  2 --
 spec/rtems/event/req/send-receive.yml |  2 --
 spec/rtems/message/req/receive.yml    |  2 --
 spec/rtems/sem/req/obtain.yml         |  2 --
 spec/rtems/type/req/no-timeout.yml    | 15 +++++++++++++++
 spec/rtems/type/val/type.yml          | 14 ++++++++++++++
 6 files changed, 29 insertions(+), 8 deletions(-)

diff --git a/spec/rtems/barrier/req/wait.yml b/spec/rtems/barrier/req/wait.yml
index 87edf8a8..26ae81dd 100644
--- a/spec/rtems/barrier/req/wait.yml
+++ b/spec/rtems/barrier/req/wait.yml
@@ -6,8 +6,6 @@ functional-type: action
 links:
 - role: interface-function
   uid: ../if/wait
-- role: interface-function
-  uid: ../../type/if/no-timeout
 post-conditions:
 - name: Status
   states:
diff --git a/spec/rtems/event/req/send-receive.yml b/spec/rtems/event/req/send-receive.yml
index 7c84f87e..082f8a30 100644
--- a/spec/rtems/event/req/send-receive.yml
+++ b/spec/rtems/event/req/send-receive.yml
@@ -6,8 +6,6 @@ functional-type: action
 links:
 - role: requirement-refinement
   uid: group
-- role: interface-function
-  uid: ../../type/if/no-timeout
 post-conditions:
 - name: SendStatus
   states:
diff --git a/spec/rtems/message/req/receive.yml b/spec/rtems/message/req/receive.yml
index a3dc0152..bb85de9e 100644
--- a/spec/rtems/message/req/receive.yml
+++ b/spec/rtems/message/req/receive.yml
@@ -6,8 +6,6 @@ functional-type: action
 links:
 - role: interface-function
   uid: ../if/receive
-- role: interface-function
-  uid: ../../type/if/no-timeout
 - role: function-implementation
   uid: /score/tq/req/enqueue-fifo
 - role: function-implementation
diff --git a/spec/rtems/sem/req/obtain.yml b/spec/rtems/sem/req/obtain.yml
index 58fac652..856eb411 100644
--- a/spec/rtems/sem/req/obtain.yml
+++ b/spec/rtems/sem/req/obtain.yml
@@ -6,8 +6,6 @@ functional-type: action
 links:
 - role: interface-function
   uid: ../if/obtain
-- role: interface-function
-  uid: ../../type/if/no-timeout
 - role: function-implementation
   uid: /score/mtx/req/seize-try
 - role: function-implementation
diff --git a/spec/rtems/type/req/no-timeout.yml b/spec/rtems/type/req/no-timeout.yml
new file mode 100644
index 00000000..e6d7978b
--- /dev/null
+++ b/spec/rtems/type/req/no-timeout.yml
@@ -0,0 +1,15 @@
+SPDX-License-Identifier: CC-BY-SA-4.0
+copyrights:
+- Copyright (C) 2023 embedded brains GmbH (http://www.embedded-brains.de)
+enabled-by: true
+links:
+- role: interface-function
+  uid: ../if/no-timeout
+functional-type: function
+rationale: null
+references: []
+requirement-type: functional
+text: |
+  The ${../if/no-timeout:/name} constant shall be a constant expression which
+  evaluates to a value of zero.
+type: requirement
diff --git a/spec/rtems/type/val/type.yml b/spec/rtems/type/val/type.yml
index b20a6f99..653b636b 100644
--- a/spec/rtems/type/val/type.yml
+++ b/spec/rtems/type/val/type.yml
@@ -22,6 +22,20 @@ test-actions:
     - role: validation
       uid: ../req/id-none
   links: []
+- action-brief: |
+    Validate the ${../if/no-timeout:/name} constant.
+  action-code: |
+    /* Nothing to do */
+  checks:
+  - brief: |
+      Assert that ${../if/no-timeout:/name} is a compile time constant which
+      evaluates to a value of zero.
+    code: |
+      RTEMS_STATIC_ASSERT( RTEMS_NO_TIMEOUT == 0, NO_TIMEOUT );
+    links:
+    - role: validation
+      uid: ../req/no-timeout
+  links: []
 test-brief: |
   Tests some ${../if/group:/name} interfaces.
 test-context: []



More information about the vc mailing list