From 96aa248244333648a0f25df207ee7b07da43117f Mon Sep 17 00:00:00 2001 From: Sebastian Huber Date: Thu, 18 Nov 2021 08:40:43 +0100 Subject: spec: Specify RTEMS_NO_PRIORITY --- spec/rtems/task/req/no-priority.yml | 20 ++++++++++++++++++++ spec/rtems/task/val/task.yml | 12 ++++++++++++ 2 files changed, 32 insertions(+) create mode 100644 spec/rtems/task/req/no-priority.yml 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 @@ -101,6 +101,18 @@ test-actions: links: - 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: | -- cgit v1.2.3