On 19/9/2022 5:21 pm, Sebastian Huber wrote:
> On 17/09/2022 09:31, Chris Johns wrote:
>>> +rtems_configuration_get_do_zero_of_workspace()
>>> +----------------------------------------------
>>> +
>>> +Indicates if the RTEMS Workspace is configured to be zeroed during system
>>> +initialization for this application.
>>> +
>>> +.. rubric:: CALLING SEQUENCE:
>>> +
>>> +.. code-block:: c
>>> +
>>> +    #define rtems_configuration_get_do_zero_of_workspace()
>>> +
>>> +.. rubric:: RETURN VALUES:
>>> +
>>> +Returns true, if the RTEMS Workspace is configured to be zeroed during 
>>> system
>>> +initialization for this application, otherwise false.
>> Should the type returned be specified?
> 
> Historically, these rtems_configuration_get*() directives are implemented as a
> macro. We could change them to inline functions to get a typed interface.

Or just provide the type in the doco to guide the user. For example which is the
one to use and not get warnings from a pedantic compiler:

  unsigned long long v = rtems_configuration_get_do_zero_of_workspace();
  float v = rtems_configuration_get_do_zero_of_workspace();
  bool v = rtems_configuration_get_do_zero_of_workspace();
  int v = rtems_configuration_get_do_zero_of_workspace();

?

Chris
_______________________________________________
devel mailing list
devel@rtems.org
http://lists.rtems.org/mailman/listinfo/devel

Reply via email to