[rtems-central commit] applconfig: Use unspecified groups

Sebastian Huber sebh at rtems.org
Fri May 7 17:06:26 UTC 2021


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

Author:    Sebastian Huber <sebastian.huber at embedded-brains.de>
Date:      Fri May  7 13:45:01 2021 +0200

applconfig: Use unspecified groups

---

 rtemsspec/applconfig.py                          |  5 -----
 rtemsspec/sphinxcontent.py                       | 11 +++++++++++
 spec/acfg/if/scheduler-assignments.yml           |  2 +-
 spec/acfg/if/scheduler-cbs.yml                   |  2 +-
 spec/acfg/if/scheduler-edf-smp.yml               |  2 +-
 spec/acfg/if/scheduler-edf.yml                   |  2 +-
 spec/acfg/if/scheduler-priority-affinity-smp.yml |  2 +-
 spec/acfg/if/scheduler-priority-smp.yml          |  2 +-
 spec/acfg/if/scheduler-priority.yml              |  2 +-
 spec/acfg/if/scheduler-simple-smp.yml            |  2 +-
 spec/acfg/if/scheduler-simple.yml                |  2 +-
 spec/doc/if/config-scheduler-clustered.yml       | 12 ++++++++++++
 spec/spec/interface-unspecified.yml              |  4 ++++
 13 files changed, 36 insertions(+), 14 deletions(-)

diff --git a/rtemsspec/applconfig.py b/rtemsspec/applconfig.py
index e4cd29e..98b6ab7 100644
--- a/rtemsspec/applconfig.py
+++ b/rtemsspec/applconfig.py
@@ -262,8 +262,6 @@ def _sphinx_ref(ref: str) -> str:
 
 
 _SPHINX_DOC_REFS = {
-    "config-scheduler-clustered":
-    _sphinx_ref("ConfigurationSchedulersClustered"),
     "config-scheduler-table": _sphinx_ref("ConfigurationSchedulerTable"),
     "config-unlimited-objects": _sphinx_ref("ConfigUnlimitedObjects"),
     "mp-proxies": _sphinx_ref("MPCIProxies"),
@@ -298,9 +296,6 @@ def _c_user_ref(ref: str, name: str) -> str:
 
 
 _DOXYGEN_DOC_REFS = {
-    "config-scheduler-clustered":
-    _c_user_ref("config/scheduler-clustered.html",
-                "Clustered Scheduler Configuration"),
     "config-scheduler-table":
     _c_user_ref(
         "config/scheduler-clustered.html#configuration-step-3-scheduler-table",
diff --git a/rtemsspec/sphinxcontent.py b/rtemsspec/sphinxcontent.py
index 5ebf528..7b6a257 100644
--- a/rtemsspec/sphinxcontent.py
+++ b/rtemsspec/sphinxcontent.py
@@ -248,6 +248,15 @@ def _get_value_sphinx_unspecified_function(ctx: ItemGetValueContext) -> Any:
     return _get_value_sphinx_ref(ctx, _get_value_sphinx_function, "()")
 
 
+def _get_value_sphinx_unspecified_group(ctx: ItemGetValueContext) -> Any:
+    if "c-user" in ctx.item["references"]:
+        return f":ref:`{ctx.item['references']['c-user']}`"
+    if "url" in ctx.item["references"]:
+        url = ctx.item["references"]["url"]
+        return f"`{ctx.value[ctx.key]}{postfix} <{url}>`_"
+    return ctx.value[ctx.key]
+
+
 def _get_value_sphinx_unspecified_type(ctx: ItemGetValueContext) -> Any:
     return _get_value_sphinx_ref(ctx, _get_value_sphinx_type, "")
 
@@ -280,6 +289,8 @@ class SphinxMapper(ItemMapper):
                            _get_value_sphinx_unspecified_define)
         self.add_get_value("interface/unspecified-function:/name",
                            _get_value_sphinx_unspecified_function)
+        self.add_get_value("interface/unspecified-group:/name",
+                           _get_value_sphinx_unspecified_group)
         self.add_get_value("interface/unspecified-type:/name",
                            _get_value_sphinx_unspecified_type)
 
diff --git a/spec/acfg/if/scheduler-assignments.yml b/spec/acfg/if/scheduler-assignments.yml
index 151a375..fb2a189 100644
--- a/spec/acfg/if/scheduler-assignments.yml
+++ b/spec/acfg/if/scheduler-assignments.yml
@@ -25,5 +25,5 @@ notes: |
   This configuration option is only evaluated in SMP configurations.
 
   This is an advanced configuration option, see
-  ${.:/document-reference/config-scheduler-clustered}.
+  ${/doc/if/config-scheduler-clustered:/name}.
 type: interface
diff --git a/spec/acfg/if/scheduler-cbs.yml b/spec/acfg/if/scheduler-cbs.yml
index 4869a0d..782b2fe 100644
--- a/spec/acfg/if/scheduler-cbs.yml
+++ b/spec/acfg/if/scheduler-cbs.yml
@@ -19,6 +19,6 @@ notes: |
   This scheduler configuration option is an advanced configuration option.
   Think twice before you use it.
 
-  In case no explicit ${.:/document-reference/config-scheduler-clustered}
+  In case no explicit ${/doc/if/config-scheduler-clustered:/name}
   is present, then it is used as the scheduler for exactly one processor.
 type: interface
diff --git a/spec/acfg/if/scheduler-edf-smp.yml b/spec/acfg/if/scheduler-edf-smp.yml
index cb6b487..0423fe9 100644
--- a/spec/acfg/if/scheduler-edf-smp.yml
+++ b/spec/acfg/if/scheduler-edf-smp.yml
@@ -22,7 +22,7 @@ notes: |
   This scheduler algorithm is only available when RTEMS is built with SMP
   support enabled.
 
-  In case no explicit ${.:/document-reference/config-scheduler-clustered}
+  In case no explicit ${/doc/if/config-scheduler-clustered:/name}
   is present, then it is used as the scheduler for up to 32 processors.
 
   This scheduler algorithm is the default in SMP configurations if
diff --git a/spec/acfg/if/scheduler-edf.yml b/spec/acfg/if/scheduler-edf.yml
index d5adb7c..eb40f7b 100644
--- a/spec/acfg/if/scheduler-edf.yml
+++ b/spec/acfg/if/scheduler-edf.yml
@@ -19,6 +19,6 @@ notes: |
   This scheduler configuration option is an advanced configuration option.
   Think twice before you use it.
 
-  In case no explicit ${.:/document-reference/config-scheduler-clustered}
+  In case no explicit ${/doc/if/config-scheduler-clustered:/name}
   is present, then it is used as the scheduler for exactly one processor.
 type: interface
diff --git a/spec/acfg/if/scheduler-priority-affinity-smp.yml b/spec/acfg/if/scheduler-priority-affinity-smp.yml
index eb8cb9e..c4777eb 100644
--- a/spec/acfg/if/scheduler-priority-affinity-smp.yml
+++ b/spec/acfg/if/scheduler-priority-affinity-smp.yml
@@ -22,7 +22,7 @@ notes: |
   This scheduler algorithm is only available when RTEMS is built with SMP
   support enabled.
 
-  In case no explicit ${.:/document-reference/config-scheduler-clustered}
+  In case no explicit ${/doc/if/config-scheduler-clustered:/name}
   is present, then it is used as the scheduler for up to 32 processors.
 
   The memory allocated for this scheduler depends on the
diff --git a/spec/acfg/if/scheduler-priority-smp.yml b/spec/acfg/if/scheduler-priority-smp.yml
index e2b073e..5c9a601 100644
--- a/spec/acfg/if/scheduler-priority-smp.yml
+++ b/spec/acfg/if/scheduler-priority-smp.yml
@@ -22,7 +22,7 @@ notes: |
   This scheduler algorithm is only available when RTEMS is built with SMP
   support enabled.
 
-  In case no explicit ${.:/document-reference/config-scheduler-clustered}
+  In case no explicit ${/doc/if/config-scheduler-clustered:/name}
   is present, then it is used as the scheduler for up to 32 processors.
 
   The memory allocated for this scheduler depends on the
diff --git a/spec/acfg/if/scheduler-priority.yml b/spec/acfg/if/scheduler-priority.yml
index cfd76b9..488c2aa 100644
--- a/spec/acfg/if/scheduler-priority.yml
+++ b/spec/acfg/if/scheduler-priority.yml
@@ -20,7 +20,7 @@ notes: |
   This scheduler configuration option is an advanced configuration option.
   Think twice before you use it.
 
-  In case no explicit ${.:/document-reference/config-scheduler-clustered}
+  In case no explicit ${/doc/if/config-scheduler-clustered:/name}
   is present, then it is used as the scheduler for exactly one processor.
 
   This scheduler algorithm is the default when
diff --git a/spec/acfg/if/scheduler-simple-smp.yml b/spec/acfg/if/scheduler-simple-smp.yml
index a01bef0..7e64dcb 100644
--- a/spec/acfg/if/scheduler-simple-smp.yml
+++ b/spec/acfg/if/scheduler-simple-smp.yml
@@ -22,6 +22,6 @@ notes: |
   This scheduler algorithm is only available when RTEMS is built with SMP
   support enabled.
 
-  In case no explicit ${.:/document-reference/config-scheduler-clustered}
+  In case no explicit ${/doc/if/config-scheduler-clustered:/name}
   is present, then it is used as the scheduler for up to 32 processors.
 type: interface
diff --git a/spec/acfg/if/scheduler-simple.yml b/spec/acfg/if/scheduler-simple.yml
index 4060595..8f96e91 100644
--- a/spec/acfg/if/scheduler-simple.yml
+++ b/spec/acfg/if/scheduler-simple.yml
@@ -19,6 +19,6 @@ notes: |
   This scheduler configuration option is an advanced configuration option.
   Think twice before you use it.
 
-  In case no explicit ${.:/document-reference/config-scheduler-clustered}
+  In case no explicit ${/doc/if/config-scheduler-clustered:/name}
   is present, then it is used as the scheduler for exactly one processor.
 type: interface
diff --git a/spec/doc/if/config-scheduler-clustered.yml b/spec/doc/if/config-scheduler-clustered.yml
new file mode 100644
index 0000000..f586e3a
--- /dev/null
+++ b/spec/doc/if/config-scheduler-clustered.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-group
+links: []
+name: Clustered Scheduler Configuration
+references:
+  c-user: ConfigurationSchedulersClustered
+  url: https://docs.rtems.org/branches/master/c-user/config/scheduler-clustered.html
+type: interface
diff --git a/spec/spec/interface-unspecified.yml b/spec/spec/interface-unspecified.yml
index c192644..1b3c1fc 100644
--- a/spec/spec/interface-unspecified.yml
+++ b/spec/spec/interface-unspecified.yml
@@ -19,6 +19,10 @@ links:
   uid: interface
 - role: spec-refinement
   spec-key: interface-type
+  spec-value: unspecified-group
+  uid: interface
+- role: spec-refinement
+  spec-key: interface-type
   spec-value: unspecified-type
   uid: interface
 spec-description: null



More information about the vc mailing list