On 2 December 2014 at 20:03, Bill Fischofer <[email protected]> wrote:
>
>
> On Tue, Dec 2, 2014 at 1:35 PM, Mike Holmes <[email protected]> wrote:
>>
>>
>>
>> On 2 December 2014 at 06:27, Taras Kondratiuk
>> <[email protected]> wrote:
>>>
>>> ODP application may want to override default ODP logging behaviour
>>> and use custom logging function. Add a weak odp_override_log() function
>>> for this purpose instead of default fprintf().
>>>
>>> Signed-off-by: Taras Kondratiuk <[email protected]>
>>> ---
>>>  platform/linux-generic/Makefile.am             |    3 +-
>>>  platform/linux-generic/include/api/odp_debug.h |   41
>>> ++++++++++++++++--------
>>>  platform/linux-generic/odp_weak.c              |   23 +++++++++++++
>>>  3 files changed, 53 insertions(+), 14 deletions(-)
>>>  create mode 100644 platform/linux-generic/odp_weak.c
>>>
>>> diff --git a/platform/linux-generic/Makefile.am
>>> b/platform/linux-generic/Makefile.am
>>> index e709700..cc78de3 100644
>>> --- a/platform/linux-generic/Makefile.am
>>> +++ b/platform/linux-generic/Makefile.am
>>> @@ -75,4 +75,5 @@ __LIB__libodp_la_SOURCES = \
>>>                            odp_thread.c \
>>>                            odp_ticketlock.c \
>>>                            odp_time.c \
>>> -                          odp_timer.c
>>> +                          odp_timer.c \
>>> +                          odp_weak.c
>>> diff --git a/platform/linux-generic/include/api/odp_debug.h
>>> b/platform/linux-generic/include/api/odp_debug.h
>>> index e853be4..4b51038 100644
>>> --- a/platform/linux-generic/include/api/odp_debug.h
>>> +++ b/platform/linux-generic/include/api/odp_debug.h
>>> @@ -14,6 +14,7 @@
>>>
>>>  #include <stdio.h>
>>>  #include <stdlib.h>
>>> +#include <stdarg.h>
>>>
>>>  #ifdef __cplusplus
>>>  extern "C" {
>>> @@ -81,61 +82,75 @@ typedef enum odp_log_level {
>>>  } odp_log_level_e;
>>>
>>>  /**
>>> - * ODP default LOG macro.
>>> + * ODP log function
>>> + *
>>> + * Instead of direct prints to stdout/stderr all logging in ODP
>>> implementation
>>> + * should be done via this function or its wrappers.
>>> + * ODP platform MUST provide a default *weak* implementation of this
>>> function.
>>
>>
>> MUST -> must
>>
>>>
>>> + * Application MAY override the function if needed by providing a strong
>>
>>
>> MAY -> may
>>
>
>
> I disagree.  The use of CAPS indicates that RFC 2119 applies.  It is a very
> standard convention and should be encouraged when applicable.

I agree that we should say that in the ODP Specification (Architecture
doc), that we follow RFC 2119.
We have *not* done that in the API docs at all (use git grep).
If you have a couple of example API docs that uses RFC 2119 in the
text then we should think about doing the same.

Cheers,
Anders

_______________________________________________
lng-odp mailing list
[email protected]
http://lists.linaro.org/mailman/listinfo/lng-odp

Reply via email to