summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSebastian Huber <sebastian.huber@embedded-brains.de>2021-11-18 08:40:43 +0100
committerSebastian Huber <sebastian.huber@embedded-brains.de>2021-11-19 08:22:34 +0100
commit96aa248244333648a0f25df207ee7b07da43117f (patch)
tree0801a281b177ac3eb21f0fa3680f25dc0e179d67
parentspec: Specify RTEMS_SELF (diff)
downloadrtems-central-96aa248244333648a0f25df207ee7b07da43117f.tar.bz2
spec: Specify RTEMS_NO_PRIORITY
-rw-r--r--spec/rtems/task/req/no-priority.yml20
-rw-r--r--spec/rtems/task/val/task.yml12
2 files changed, 32 insertions, 0 deletions
diff --git a/spec/rtems/task/req/no-priority.yml b/spec/rtems/task/req/no-priority.yml
new file mode 100644
index 00000000..8632f4e6
--- /dev/null
+++ b/spec/rtems/task/req/no-priority.yml
@@ -0,0 +1,20 @@
+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/no-priority
+functional-type: function
+rationale: |
+ Some directives with a task priority parameter ignore the priority value
+ under specific circumstances, for example ${../if/set-priority:/name} may be
+ used to get the current priority. This constant may be used as a dummy task
+ priority value to document that the priority parameter is unused.
+references: []
+requirement-type: functional
+text: |
+ The ${../if/no-priority} constant shall expand to a constant
+ expression which evaluates to the value of
+ ${../if/current-priority:/name}.
+type: requirement
diff --git a/spec/rtems/task/val/task.yml b/spec/rtems/task/val/task.yml
index aa29cfe6..5d36dbc2 100644
--- a/spec/rtems/task/val/task.yml
+++ b/spec/rtems/task/val/task.yml
@@ -102,6 +102,18 @@ test-actions:
- role: validation
uid: ../req/storage-alignment
- action-brief: |
+ Assert that ${../if/no-priority:/name} is a constant expression which
+ evaluates to the expected value.
+ action-code: |
+ RTEMS_STATIC_ASSERT(
+ RTEMS_NO_PRIORITY == RTEMS_CURRENT_PRIORITY,
+ NO_PRIORITY
+ );
+ checks: []
+ links:
+ - role: validation
+ uid: ../req/no-priority
+- action-brief: |
Validate ${../if/self-define:/name} using a sample directive call.
action-code: |
rtems_status_code sc;