[rtems-central commit] spec: Add idle task stack allocator option

Sebastian Huber sebh at rtems.org
Thu Oct 28 18:14:04 UTC 2021


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

Author:    Sebastian Huber <sebastian.huber at embedded-brains.de>
Date:      Tue Oct 19 16:51:29 2021 +0200

spec: Add idle task stack allocator option

---

 .../init-task-stack-allocator-for-idle.yml         | 12 +++++++++
 spec/acfg/if/task-stack-allocator-for-idle.yml     | 30 ++++++++++++++++++++++
 spec/acfg/req/task-stack-allocator-for-idle.yml    | 15 +++++++++++
 .../config/if/get-stack-allocate-for-idle-hook.yml | 28 ++++++++++++++++++++
 .../score/stack/if/allocator-allocate-for-idle.yml | 12 +++++++++
 5 files changed, 97 insertions(+)

diff --git a/spec/acfg/constraint/init-task-stack-allocator-for-idle.yml b/spec/acfg/constraint/init-task-stack-allocator-for-idle.yml
new file mode 100644
index 0000000..7f2586e
--- /dev/null
+++ b/spec/acfg/constraint/init-task-stack-allocator-for-idle.yml
@@ -0,0 +1,12 @@
+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:
+- role: requirement-refinement
+  uid: /req/usage-constraints
+rationale: null
+text: |
+  The value of the application configuration option shall be defined to a valid
+  function pointer of the type ``void *( *allocate )( uint32_t, size_t )``.
+type: constraint
diff --git a/spec/acfg/if/task-stack-allocator-for-idle.yml b/spec/acfg/if/task-stack-allocator-for-idle.yml
new file mode 100644
index 0000000..c2d42aa
--- /dev/null
+++ b/spec/acfg/if/task-stack-allocator-for-idle.yml
@@ -0,0 +1,30 @@
+SPDX-License-Identifier: CC-BY-SA-4.0 OR BSD-2-Clause
+appl-config-option-type: initializer
+copyrights:
+- Copyright (C) 2021 On-Line Applications Research Corporation (OAR)
+default-value: |
+  The default value is ``_Stack_Allocator_allocate_for_idle_default``, which
+  indicates that IDLE task stacks will be allocated from an area statically
+  allocated by ``<rtems/confdefs.h>``.
+description: |
+  The value of this configuration option is the address for the stack allocator
+  allocate handler used to allocate the task stack of each
+  ${/glossary/idletask:/term}.
+enabled-by: true
+index-entries:
+- task stack allocator for IDLE tasks
+interface-type: appl-config-option
+links:
+- role: requirement-refinement
+  uid: ../req/task-stack-allocator-for-idle
+- role: appl-config-group-member
+  uid: group-stackalloc
+- role: constraint
+  uid: ../constraint/init-task-stack-allocator-for-idle
+name: CONFIGURE_TASK_STACK_ALLOCATOR_FOR_IDLE
+notes: |
+  This configuration option is independent of the other thread stack allocator
+  configuration options.  It is assumed that any memory allocated for the stack
+  of an ${/glossary/idletask:/term} will not be from the RTEMS Workspace or the
+  memory statically allocated by default.
+type: interface
diff --git a/spec/acfg/req/task-stack-allocator-for-idle.yml b/spec/acfg/req/task-stack-allocator-for-idle.yml
new file mode 100644
index 0000000..26d303f
--- /dev/null
+++ b/spec/acfg/req/task-stack-allocator-for-idle.yml
@@ -0,0 +1,15 @@
+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:
+- role: requirement-refinement
+  uid: /req/applconfig
+non-functional-type: interface-requirement
+rationale: null
+references: []
+requirement-type: non-functional
+text: |
+  The system shall provide an application configuration option which defines
+  the stack allocator allocate handler for an ${/glossary/idletask:/term}.
+type: requirement
diff --git a/spec/rtems/config/if/get-stack-allocate-for-idle-hook.yml b/spec/rtems/config/if/get-stack-allocate-for-idle-hook.yml
new file mode 100644
index 0000000..f95c029
--- /dev/null
+++ b/spec/rtems/config/if/get-stack-allocate-for-idle-hook.yml
@@ -0,0 +1,28 @@
+SPDX-License-Identifier: CC-BY-SA-4.0 OR BSD-2-Clause
+brief: |
+  Gets the thread stack allocator allocate hook used to allocate the stack of
+  each ${/glossary/idletask:/term} configured for this application.
+copyrights:
+- Copyright (C) 2021 On-Line Applications Research Corporation (OAR)
+definition:
+  default: ${/score/stack/if/allocator-allocate-for-idle:/name}
+  variants: []
+description: null
+enabled-by: true
+index-entries: []
+interface-type: macro
+links:
+- role: interface-placement
+  uid: header
+- role: interface-ingroup
+  uid: group
+name: rtems_configuration_get_stack_allocate_for_idle_hook
+notes: |
+  See ${/acfg/if/task-stack-allocator-for-idle:/name}.
+params: []
+return:
+  return: |
+    Returns the thread stack allocator allocate hook used to allocate the stack
+    of each ${/glossary/idletask:/term} configured for this application.
+  return-values: []
+type: interface
diff --git a/spec/score/stack/if/allocator-allocate-for-idle.yml b/spec/score/stack/if/allocator-allocate-for-idle.yml
new file mode 100644
index 0000000..17666bd
--- /dev/null
+++ b/spec/score/stack/if/allocator-allocate-for-idle.yml
@@ -0,0 +1,12 @@
+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
+index-entries: []
+interface-type: unspecified
+links:
+- role: interface-placement
+  uid: header
+name: _Stack_Allocator_allocate_for_idle
+references: []
+type: interface



More information about the vc mailing list