<meta http-equiv="Content-Type" content="text/html; charset=utf-8"><div dir="ltr"><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Thu, Jan 25, 2024 at 2:17 AM Sebastian Huber <<a href="mailto:sebastian.huber@embedded-brains.de">sebastian.huber@embedded-brains.de</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><br>
<br>
On 24.01.24 18:19, Kinsey Moore wrote:<br>
> This changes the return type for rtems_cache_coherent_add_area from void<br>
> to rtems_status_code so that the function can report errors when they<br>
> occur.<br>
> ---<br>
> spec/rtems/cache/if/coherent-add-area.yml | 14 ++++++++++++--<br>
> 1 file changed, 12 insertions(+), 2 deletions(-)<br>
> <br>
> diff --git a/spec/rtems/cache/if/coherent-add-area.yml b/spec/rtems/cache/if/coherent-add-area.yml<br>
> index 410f3c58..325d043c 100644<br>
> --- a/spec/rtems/cache/if/coherent-add-area.yml<br>
> +++ b/spec/rtems/cache/if/coherent-add-area.yml<br>
> @@ -10,7 +10,7 @@ definition:<br>
> params:<br>
> - void *${.:/params[0]/name}<br>
> - ${/c/if/uintptr_t:/name} ${.:/params[1]/name}<br>
> - return: void<br>
> + return: rtems_status_code<br>
<br>
This should be:<br>
<br>
return: ${../../status/if/code:/name}<br>
<br>
> variants: []<br>
> description: null<br>
> enabled-by: true<br>
> @@ -40,5 +40,15 @@ params:<br>
> is the size in bytes of the cache coherent memory area to add.<br>
> dir: null<br>
> name: size<br>
> -return: null<br>
> +return:<br>
> + return: |<br>
> + Returns a rtems_status_code indicating whether the area was added to cache<br>
> + coherent memory.<br>
<br>
We have a standard scheme for status code documentations, see for <br>
example spec/rtems/sem/if/obtain.yml. For example:<br>
<br>
return:<br>
return: null<br>
return-values:<br>
- description: |<br>
The requested operation was successful.<br>
value: ${../../status/if/successful:/name}<br>
- description: |<br>
The memory area is too small and was not added to the heap.<br>
value: ${../../status/if/unsatisfied:/name}<br></blockquote><div><br></div><div>Updates to both patches coming shortly.</div><div><br></div><div>Kinsey <br></div></div></div>