On 24.01.24 18:19, Kinsey Moore wrote:
This changes the return type for rtems_cache_coherent_add_area from void
to rtems_status_code so that the function can report errors when they
occur.
---
  spec/rtems/cache/if/coherent-add-area.yml | 14 ++++++++++++--
  1 file changed, 12 insertions(+), 2 deletions(-)

diff --git a/spec/rtems/cache/if/coherent-add-area.yml 
b/spec/rtems/cache/if/coherent-add-area.yml
index 410f3c58..325d043c 100644
--- a/spec/rtems/cache/if/coherent-add-area.yml
+++ b/spec/rtems/cache/if/coherent-add-area.yml
@@ -10,7 +10,7 @@ definition:
      params:
      - void *${.:/params[0]/name}
      - ${/c/if/uintptr_t:/name} ${.:/params[1]/name}
-    return: void
+    return: rtems_status_code

This should be:

return: ${../../status/if/code:/name}

    variants: []
  description: null
  enabled-by: true
@@ -40,5 +40,15 @@ params:
      is the size in bytes of the cache coherent memory area to add.
    dir: null
    name: size
-return: null
+return:
+  return: |
+    Returns a rtems_status_code indicating whether the area was added to cache
+    coherent memory.

We have a standard scheme for status code documentations, see for example spec/rtems/sem/if/obtain.yml. For example:

return:
  return: null
  return-values:
  - description: |
      The requested operation was successful.
    value: ${../../status/if/successful:/name}
  - description: |
      The memory area is too small and was not added to the heap.
    value: ${../../status/if/unsatisfied:/name}

+  return-values:
+  - description: |
+      The cache coherent memory extension was successful.
+    value: ${../../status/if/successful:/name}
+  - description: |
+      The cache coherent memory extension was not successful.
+    value: ${../../status/if/unsatisfied:/name}
  type: interface

--
embedded brains GmbH & Co. KG
Herr Sebastian HUBER
Dornierstr. 4
82178 Puchheim
Germany
email: sebastian.hu...@embedded-brains.de
phone: +49-89-18 94 741 - 16
fax:   +49-89-18 94 741 - 08

Registergericht: Amtsgericht München
Registernummer: HRB 157899
Vertretungsberechtigte Geschäftsführer: Peter Rasmussen, Thomas Dörfler
Unsere Datenschutzerklärung finden Sie hier:
https://embedded-brains.de/datenschutzerklaerung/
_______________________________________________
devel mailing list
devel@rtems.org
http://lists.rtems.org/mailman/listinfo/devel

Reply via email to