Sorry, my mistake. I had assumed that using odp_time_null() rather than _odp_time_null() was because it was implementing an external API. However that does raise the question of whether odp_time_null() or ODP_TIME_NULL should be part of the external API.
On Wed, Dec 9, 2015 at 10:29 AM, Maxim Uvarov <maxim.uva...@linaro.org> wrote: > On 12/09/2015 19:26, Bill Fischofer wrote: > >> This is proposing an API change. It's OK to change how odp_time_null() >> is implemented in linux-generic, but we can't arbitrarily remove this >> public API from the linux-generic implementation. >> > > But it's not defined in API headers: > fgrep -r odp_time_null ./include/ > <nothing> > > Also all validation tests use ODP_TIME_NULL instead of odp_time_null(). > There is no need to duplicated things. > > Maxim. > > >> On Wed, Dec 9, 2015 at 10:08 AM, Maxim Uvarov <maxim.uva...@linaro.org >> <mailto:maxim.uva...@linaro.org>> wrote: >> >> No need to define odp_time_null() as it only initialize to 0 >> time. Remove it completely with needed to add doxygen comment >> for it. >> >> Signed-off-by: Maxim Uvarov <maxim.uva...@linaro.org >> <mailto:maxim.uva...@linaro.org>> >> >> --- >> platform/linux-generic/include/odp/plat/time_types.h | 4 +--- >> platform/linux-generic/odp_time.c | 7 +------ >> 2 files changed, 2 insertions(+), 9 deletions(-) >> >> diff --git a/platform/linux-generic/include/odp/plat/time_types.h >> b/platform/linux-generic/include/odp/plat/time_types.h >> index e5765ec..10751f5 100644 >> --- a/platform/linux-generic/include/odp/plat/time_types.h >> +++ b/platform/linux-generic/include/odp/plat/time_types.h >> @@ -23,9 +23,7 @@ extern "C" { >> >> typedef struct timespec odp_time_t; >> >> -odp_time_t odp_time_null(void); >> - >> -#define ODP_TIME_NULL odp_time_null() >> +#define ODP_TIME_NULL ((odp_time_t) {0, 0}) >> >> /** >> * @} >> diff --git a/platform/linux-generic/odp_time.c >> b/platform/linux-generic/odp_time.c >> index 1c7c214..1d374ca 100644 >> --- a/platform/linux-generic/odp_time.c >> +++ b/platform/linux-generic/odp_time.c >> @@ -113,18 +113,13 @@ uint64_t odp_time_to_u64(odp_time_t time) >> return time_to_ns(time) / resolution; >> } >> >> -odp_time_t odp_time_null(void) >> -{ >> - return (struct timespec) {0, 0}; >> -} >> - >> int odp_time_global_init(void) >> { >> int ret; >> struct timespec time; >> >> ret = clock_gettime(CLOCK_MONOTONIC_RAW, &time); >> - start_time = ret ? odp_time_null() : time; >> + start_time = ret ? ODP_TIME_NULL : time; >> >> return ret; >> } >> -- >> 1.9.1 >> >> _______________________________________________ >> lng-odp mailing list >> lng-odp@lists.linaro.org <mailto:lng-odp@lists.linaro.org> >> https://lists.linaro.org/mailman/listinfo/lng-odp >> >> >> >
_______________________________________________ lng-odp mailing list lng-odp@lists.linaro.org https://lists.linaro.org/mailman/listinfo/lng-odp