summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSebastian Huber <sebastian.huber@embedded-brains.de>2021-11-17 20:42:27 +0100
committerSebastian Huber <sebastian.huber@embedded-brains.de>2021-11-19 08:22:34 +0100
commit7abe66d7971a489a95c16d5332e1c5b6a50bddc5 (patch)
tree70b798910b013a6fc3b4480d3f06cf098fbff88b
parentspec: Specify RTEMS_ID_NONE (diff)
downloadrtems-central-7abe66d7971a489a95c16d5332e1c5b6a50bddc5.tar.bz2
spec: Specify scheduler language bindings
-rw-r--r--spec/rtems/scheduler/req/get-processor-maximum-non-smp.yml6
-rw-r--r--spec/rtems/scheduler/req/get-processor-maximum-smp-only.yml10
-rw-r--r--spec/rtems/scheduler/req/get-processor-maximum.yml16
-rw-r--r--spec/rtems/scheduler/req/get-processor-non-smp.yml6
-rw-r--r--spec/rtems/scheduler/req/get-processor-smp-only.yml8
-rw-r--r--spec/rtems/scheduler/req/get-processor.yml16
-rw-r--r--spec/rtems/scheduler/val/scheduler.yml82
7 files changed, 129 insertions, 15 deletions
diff --git a/spec/rtems/scheduler/req/get-processor-maximum-non-smp.yml b/spec/rtems/scheduler/req/get-processor-maximum-non-smp.yml
index 1b8057d6..d437dcf1 100644
--- a/spec/rtems/scheduler/req/get-processor-maximum-non-smp.yml
+++ b/spec/rtems/scheduler/req/get-processor-maximum-non-smp.yml
@@ -5,12 +5,12 @@ enabled-by:
not: RTEMS_SMP
links:
- role: interface-function
- uid: ../if/get-processor-maximum
+ uid: ../if/get-processor-maximum-macro
functional-type: function
rationale: null
references: []
requirement-type: functional
text: |
- The ${../if/get-processor-maximum:/name} directive call shall be a constant
- expression which evaluates to one.
+ The ${../if/get-processor-maximum-macro:/name} directive call shall evaluate
+ to a constant expression which is equal to one.
type: requirement
diff --git a/spec/rtems/scheduler/req/get-processor-maximum-smp-only.yml b/spec/rtems/scheduler/req/get-processor-maximum-smp-only.yml
index 3db68efb..56648165 100644
--- a/spec/rtems/scheduler/req/get-processor-maximum-smp-only.yml
+++ b/spec/rtems/scheduler/req/get-processor-maximum-smp-only.yml
@@ -4,14 +4,14 @@ copyrights:
enabled-by: RTEMS_SMP
links:
- role: interface-function
- uid: ../if/get-processor-maximum
+ uid: ../if/get-processor-maximum-macro
functional-type: function
rationale: null
references: []
requirement-type: functional
text: |
- The return value of the ${../if/get-processor-maximum:/name} directive shall
- be the minimum of the processors available at the ${/glossary/target:/term}
- and the ${/acfg/if/max-processors:/name} application configuration option
- value.
+ The return value of the ${../if/get-processor-maximum-macro:/name} directive
+ shall be the minimum of the processors available at the
+ ${/glossary/target:/term} and the ${/acfg/if/max-processors:/name}
+ application configuration option value.
type: requirement
diff --git a/spec/rtems/scheduler/req/get-processor-maximum.yml b/spec/rtems/scheduler/req/get-processor-maximum.yml
new file mode 100644
index 00000000..0f6d7e63
--- /dev/null
+++ b/spec/rtems/scheduler/req/get-processor-maximum.yml
@@ -0,0 +1,16 @@
+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/get-processor-maximum
+functional-type: function
+rationale: null
+references: []
+requirement-type: functional
+text: |
+ When the ${../if/get-processor-maximum:/name} directive is called, the
+ directive shall return the return value of a call to
+ ${../if/get-processor-maximum-macro:/name}.
+type: requirement
diff --git a/spec/rtems/scheduler/req/get-processor-non-smp.yml b/spec/rtems/scheduler/req/get-processor-non-smp.yml
index 4e9dd035..4f7650b9 100644
--- a/spec/rtems/scheduler/req/get-processor-non-smp.yml
+++ b/spec/rtems/scheduler/req/get-processor-non-smp.yml
@@ -5,12 +5,12 @@ enabled-by:
not: RTEMS_SMP
links:
- role: interface-function
- uid: ../if/get-processor
+ uid: ../if/get-processor-macro
functional-type: function
rationale: null
references: []
requirement-type: functional
text: |
- The ${../if/get-processor:/name} directive call shall be a constant
- expression which evaluates to zero.
+ The ${../if/get-processor-macro:/name} directive call shall evaluate
+ to a constant expression which is equal to zero.
type: requirement
diff --git a/spec/rtems/scheduler/req/get-processor-smp-only.yml b/spec/rtems/scheduler/req/get-processor-smp-only.yml
index 0fc3030b..db9ae164 100644
--- a/spec/rtems/scheduler/req/get-processor-smp-only.yml
+++ b/spec/rtems/scheduler/req/get-processor-smp-only.yml
@@ -4,13 +4,13 @@ copyrights:
enabled-by: RTEMS_SMP
links:
- role: interface-function
- uid: ../if/get-processor
+ uid: ../if/get-processor-macro
functional-type: function
rationale: null
references: []
requirement-type: functional
text: |
- The return value of the ${../if/get-processor:/name} directive shall be the
- index of a processor which executed at least one instruction of the directive
- call.
+ The return value of the ${../if/get-processor-macro:/name} directive shall be
+ the index of a processor which executed at least one instruction of the
+ directive call.
type: requirement
diff --git a/spec/rtems/scheduler/req/get-processor.yml b/spec/rtems/scheduler/req/get-processor.yml
new file mode 100644
index 00000000..c5748fc3
--- /dev/null
+++ b/spec/rtems/scheduler/req/get-processor.yml
@@ -0,0 +1,16 @@
+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/get-processor
+functional-type: function
+rationale: null
+references: []
+requirement-type: functional
+text: |
+ When the ${../if/get-processor:/name} directive is called, the directive
+ shall return the return value of a call to
+ ${../if/get-processor-macro:/name}.
+type: requirement
diff --git a/spec/rtems/scheduler/val/scheduler.yml b/spec/rtems/scheduler/val/scheduler.yml
new file mode 100644
index 00000000..4e05c646
--- /dev/null
+++ b/spec/rtems/scheduler/val/scheduler.yml
@@ -0,0 +1,82 @@
+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 ${../if/get-processor:/name}.
+ action-code: |
+ uint32_t cpu_index;
+ uint32_t cpu_index_macro;
+
+ cpu_index = GetProcessor();
+ cpu_index_macro = GetProcessorMacro();
+ checks:
+ - brief: |
+ Check that the values returned by ${../if/get-processor:/name}
+ and ${../if/get-processor-macro:/name} are equal.
+ code: |
+ T_step_eq_u32( ${step}, cpu_index, cpu_index_macro );
+ links:
+ - role: validation
+ uid: ../req/get-processor
+ links: []
+- action-brief: |
+ Validate ${../if/get-processor-maximum:/name}.
+ action-code: |
+ uint32_t cpu_max;
+ uint32_t cpu_max_macro;
+
+ cpu_max = GetProcessorMaximum();
+ cpu_max_macro = GetProcessorMaximumMacro();
+ checks:
+ - brief: |
+ Check that the values returned by ${../if/get-processor-maximum:/name}
+ and ${../if/get-processor-maximum-macro:/name} are equal.
+ code: |
+ T_step_eq_u32( ${step}, cpu_max, cpu_max_macro );
+ links:
+ - role: validation
+ uid: ../req/get-processor-maximum
+ links: []
+test-brief: |
+ This test case collection provides validation test cases for
+ general requirements of the ${../if/group:/name}.
+test-context: []
+test-context-support: null
+test-description: null
+test-header: null
+test-includes:
+- rtems.h
+test-local-includes:
+- tx-support.h
+test-setup: null
+test-stop: null
+test-support: |
+ static uint32_t GetProcessorMaximumMacro( void )
+ {
+ return rtems_scheduler_get_processor_maximum();
+ }
+
+ #undef rtems_scheduler_get_processor_maximum
+
+ static uint32_t GetProcessorMaximum( void )
+ {
+ return rtems_scheduler_get_processor_maximum();
+ }
+
+ static uint32_t GetProcessorMacro( void )
+ {
+ return rtems_scheduler_get_processor();
+ }
+
+ #undef rtems_scheduler_get_processor
+
+ static uint32_t GetProcessor( void )
+ {
+ return rtems_scheduler_get_processor();
+ }
+test-target: testsuites/validation/tc-scheduler.c
+test-teardown: null
+type: test-case