[rtems-central commit] spec: Specify RTEMS_ID_NONE

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


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

Author:    Sebastian Huber <sebastian.huber at embedded-brains.de>
Date:      Wed Nov 17 17:32:36 2021 +0100

spec: Specify RTEMS_ID_NONE

---

 spec/rtems/type/req/id-none.yml | 15 +++++++++++++++
 spec/rtems/type/val/type.yml    | 40 ++++++++++++++++++++++++++++++++++++++++
 2 files changed, 55 insertions(+)

diff --git a/spec/rtems/type/req/id-none.yml b/spec/rtems/type/req/id-none.yml
new file mode 100644
index 0000000..7462c7c
--- /dev/null
+++ b/spec/rtems/type/req/id-none.yml
@@ -0,0 +1,15 @@
+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/id-none
+functional-type: function
+rationale: null
+references: []
+requirement-type: functional
+text: |
+  The ${../if/id-none:/name} constant shall be a constant expression which
+  evaluates to an invalid object identifier.
+type: requirement
diff --git a/spec/rtems/type/val/type.yml b/spec/rtems/type/val/type.yml
new file mode 100644
index 0000000..b20a6f9
--- /dev/null
+++ b/spec/rtems/type/val/type.yml
@@ -0,0 +1,40 @@
+SPDX-License-Identifier: CC-BY-SA-4.0 OR BSD-2-Clause
+copyrights:
+- Copyright (C) 2021 embedded brains GmbH (http://www.embedded-brains.de)
+enabled-by: true
+links: []
+test-actions:
+- action-brief: |
+    Validate the ${../if/id-none:/name} constant.
+  action-code: |
+    /* Nothing to do */
+  checks:
+  - brief: |
+      Assert that ${../if/id-none:/name} cannot be associated with an object
+      because it has an object index outside the range of valid object indices.
+    code: |
+      RTEMS_STATIC_ASSERT(
+        ( ( RTEMS_ID_NONE >> OBJECTS_INDEX_START_BIT ) &
+          OBJECTS_INDEX_VALID_BITS ) < OBJECTS_INDEX_MINIMUM,
+        ID_NONE
+      );
+    links:
+    - role: validation
+      uid: ../req/id-none
+  links: []
+test-brief: |
+  Tests some ${../if/group:/name} interfaces.
+test-context: []
+test-context-support: null
+test-description: null
+test-header: null
+test-includes:
+- rtems.h
+- rtems/score/objectimpl.h
+test-local-includes: []
+test-setup: null
+test-stop: null
+test-support: null
+test-target: testsuites/validation/tc-type.c
+test-teardown: null
+type: test-case



More information about the vc mailing list