nack: I believe the public api needs to be in include/odp/api/version.h and that const char *odp_version_impl_str(void); is part of the public API
On 4 February 2015 at 05:41, Ola Liljedahl <[email protected]> wrote: > On 4 February 2015 at 11:35, Maxim Uvarov <[email protected]> wrote: > > odp_version_api_str() has to be in API header while > > odp_version_impl_str() should be in linux-generic. > The definition of odp_version_impl_str() could (should) be part of the > ODP API and thus defined in include/odp/api/version.h. > The value (string) it returns is implementation specific (that being > the whole purpose of the function). > > Why was the definition removed from include/odp/api/version.h? > > > > > That change fixes: > > https://bugs.linaro.org/show_bug.cgi?id=1194 > > > > Signed-off-by: Maxim Uvarov <[email protected]> > > --- > > v3: make implementation version not online, for that > > odp_impl.c goes away and replaced with odp_version.c, which > > has implementation for version strings (api and implementation). > > > > include/odp/api/version.h | 12 ------- > > platform/linux-generic/Makefile.am | 5 ++- > > .../linux-generic/include/odp/plat/version_types.h | 30 > ----------------- > > platform/linux-generic/include/odp/version.h | 25 +++++++------- > > platform/linux-generic/odp_impl.c | 35 > ------------------- > > platform/linux-generic/odp_version.c | 39 > ++++++++++++++++++++++ > > 6 files changed, 53 insertions(+), 93 deletions(-) > > delete mode 100644 > platform/linux-generic/include/odp/plat/version_types.h > > delete mode 100644 platform/linux-generic/odp_impl.c > > create mode 100644 platform/linux-generic/odp_version.c > > > > diff --git a/include/odp/api/version.h b/include/odp/api/version.h > > index 0889d9c..834835e 100644 > > --- a/include/odp/api/version.h > > +++ b/include/odp/api/version.h > > @@ -53,18 +53,6 @@ extern "C" { > > */ > > const char *odp_version_api_str(void); > > > > - > > -/** > > - * Returns ODP implementation version string > > - * > > - * Every implementation of ODP may receive bug fixes independent of the > version > > - * of the API changing, this function returns that indication string. > > - * @note This string is implementation specific. > > - * @sa odp_version_api_str() > > - * > > - * @return null terminated implementation specific version identifier > string > > - */ > > -const char *odp_version_impl_str(void); > > /** > > * @} > > */ > > diff --git a/platform/linux-generic/Makefile.am > b/platform/linux-generic/Makefile.am > > index 81245b1..68603c7 100644 > > --- a/platform/linux-generic/Makefile.am > > +++ b/platform/linux-generic/Makefile.am > > @@ -57,8 +57,7 @@ odpplatinclude_HEADERS = \ > > > $(top_srcdir)/platform/linux-generic/include/odp/plat/queue_types.h \ > > > $(top_srcdir)/platform/linux-generic/include/odp/plat/schedule_types.h \ > > > $(top_srcdir)/platform/linux-generic/include/odp/plat/shared_memory_types.h > \ > > - > $(top_srcdir)/platform/linux-generic/include/odp/plat/strong_types.h \ > > - > $(top_srcdir)/platform/linux-generic/include/odp/plat/version_types.h > > + > $(top_srcdir)/platform/linux-generic/include/odp/plat/strong_types.h > > > > odpapiincludedir= $(includedir)/odp/api > > odpapiinclude_HEADERS = \ > > @@ -137,7 +136,6 @@ __LIB__libodp_la_SOURCES = \ > > odp_crypto.c \ > > odp_event.c \ > > odp_init.c \ > > - odp_impl.c \ > > odp_linux.c \ > > odp_packet.c \ > > odp_packet_flags.c \ > > @@ -154,4 +152,5 @@ __LIB__libodp_la_SOURCES = \ > > odp_ticketlock.c \ > > odp_time.c \ > > odp_timer.c \ > > + odp_version.c \ > > odp_weak.c > > diff --git a/platform/linux-generic/include/odp/plat/version_types.h > b/platform/linux-generic/include/odp/plat/version_types.h > > deleted file mode 100644 > > index e3327eb..0000000 > > --- a/platform/linux-generic/include/odp/plat/version_types.h > > +++ /dev/null > > @@ -1,30 +0,0 @@ > > -/* Copyright (c) 2015, Linaro Limited > > - * All rights reserved. > > - * > > - * SPDX-License-Identifier: BSD-3-Clause > > - */ > > - > > -#ifndef ODP_VERSION_TYPESH_ > > -#define ODP_VERSION_TYPESH_ > > - > > -#ifdef __cplusplus > > -extern "C" { > > -#endif > > - > > -/** @internal Version string expand */ > > -#define ODP_VERSION_STR_EXPAND(x) #x > > - > > -/** @internal Version to string */ > > -#define ODP_VERSION_TO_STR(x) ODP_VERSION_STR_EXPAND(x) > > - > > -/** @internal API version string */ > > -#define ODP_VERSION_API_STR \ > > -ODP_VERSION_TO_STR(ODP_VERSION_API_GENERATION) "." \ > > -ODP_VERSION_TO_STR(ODP_VERSION_API_MAJOR) "." \ > > -ODP_VERSION_TO_STR(ODP_VERSION_API_MINOR) > > - > > -#ifdef __cplusplus > > -} > > -#endif > > - > > -#endif > > diff --git a/platform/linux-generic/include/odp/version.h > b/platform/linux-generic/include/odp/version.h > > index f29320a..0c50826 100644 > > --- a/platform/linux-generic/include/odp/version.h > > +++ b/platform/linux-generic/include/odp/version.h > > @@ -17,22 +17,21 @@ > > extern "C" { > > #endif > > > > -#include <odp/plat/version_types.h> > > +#include <odp/api/version.h> > > > > -/** @ingroup odp_ver_abt_log_dbg > > - * @{ > > - */ > > - > > -static inline const char *odp_version_api_str(void) > > -{ > > - return ODP_VERSION_API_STR; > > -} > > +#define ODP_VERSION_IMPL 0 > > > > /** > > - * @} > > - */ > > - > > -#include <odp/api/version.h> > > + * Returns ODP implementation version string > > + * > > + * Every implementation of ODP may receive bug fixes independent of the > version > > + * of the API changing, this function returns that indication string. > > + * @note This string is implementation specific. > > + * @sa odp_version_api_str() > > + * > > + * @return null terminated implementation specific version identifier > string > > + */ > > +const char *odp_version_impl_str(void); > > > > #ifdef __cplusplus > > } > > diff --git a/platform/linux-generic/odp_impl.c > b/platform/linux-generic/odp_impl.c > > deleted file mode 100644 > > index ca3224d..0000000 > > --- a/platform/linux-generic/odp_impl.c > > +++ /dev/null > > @@ -1,35 +0,0 @@ > > -/* Copyright (c) 2014, Linaro Limited > > - * All rights reserved. > > - * > > - * SPDX-License-Identifier: BSD-3-Clause > > - */ > > - > > - > > -/** > > - * @file > > - * > > - * ODP Implementation information > > - */ > > - > > -#ifndef ODP_IMPL_H_ > > -#define ODP_IMPL_H_ > > - > > -#ifdef __cplusplus > > -extern "C" { > > -#endif > > - > > -#include <odp/version.h> > > - > > -#define ODP_VERSION_IMPL 0 > > -#define ODP_VERSION_IMPL_STR ODP_VERSION_TO_STR(ODP_VERSION_IMPL) > > - > > -const char *odp_version_impl_str(void) > > -{ > > - return ODP_VERSION_IMPL_STR; > > -} > > - > > -#ifdef __cplusplus > > -} > > -#endif > > - > > -#endif > > diff --git a/platform/linux-generic/odp_version.c > b/platform/linux-generic/odp_version.c > > new file mode 100644 > > index 0000000..032564d > > --- /dev/null > > +++ b/platform/linux-generic/odp_version.c > > @@ -0,0 +1,39 @@ > > +/* Copyright (c) 2014, Linaro Limited > > + * All rights reserved. > > + * > > + * SPDX-License-Identifier: BSD-3-Clause > > + */ > > + > > +/** > > + * @file > > + * > > + * ODP API and Implementation information > > + */ > > + > > +#include <odp/api/version.h> > > +#include <odp/version.h> > > + > > +/** @internal Version string expand */ > > +#define ODP_VERSION_STR_EXPAND(x) #x > > + > > +/** @internal Version to string */ > > +#define ODP_VERSION_TO_STR(x) ODP_VERSION_STR_EXPAND(x) > > + > > +/** @internal API version string */ > > +#define ODP_VERSION_API_STR \ > > +ODP_VERSION_TO_STR(ODP_VERSION_API_GENERATION) "." \ > > +ODP_VERSION_TO_STR(ODP_VERSION_API_MAJOR) "." \ > > +ODP_VERSION_TO_STR(ODP_VERSION_API_MINOR) > > + > > +const char *odp_version_api_str(void) > > +{ > > + return ODP_VERSION_API_STR; > > +} > > + > > +/** @internal Implementation version to string */ > > +#define ODP_VERSION_IMPL_STR ODP_VERSION_TO_STR(ODP_VERSION_IMPL) > > + > > +const char *odp_version_impl_str(void) > > +{ > > + return ODP_VERSION_IMPL_STR; > > +} > > -- > > 1.8.5.1.163.gd7aced9 > > > > > > _______________________________________________ > > lng-odp mailing list > > [email protected] > > http://lists.linaro.org/mailman/listinfo/lng-odp > > _______________________________________________ > lng-odp mailing list > [email protected] > http://lists.linaro.org/mailman/listinfo/lng-odp > -- *Mike Holmes* Linaro Sr Technical Manager LNG - ODP
_______________________________________________ lng-odp mailing list [email protected] http://lists.linaro.org/mailman/listinfo/lng-odp
