diff mbox

[PATCHv2] linux-generic: decouple odp_errno define from odp-linux

Message ID 1491461336-15968-1-git-send-email-balakrishna.garapati@linaro.org
State Accepted
Commit 0955fbb395dc1651a8bcd473beae2154d39f4a69
Headers show

Commit Message

Balakrishna Garapati April 6, 2017, 6:48 a.m. UTC
makes it easy to define odp_errno to dpdk rteerrno and fixes
linking issues.

Signed-off-by: Balakrishna Garapati <balakrishna.garapati@linaro.org>

---
 since v1: Fixed the extra blank line
 platform/linux-generic/Makefile.am                |  1 +
 platform/linux-generic/include/odp_errno_define.h | 26 +++++++++++++++++++++++
 platform/linux-generic/include/odp_internal.h     |  3 +--
 3 files changed, 28 insertions(+), 2 deletions(-)
 create mode 100644 platform/linux-generic/include/odp_errno_define.h

--
1.9.1

Comments

Bill Fischofer April 6, 2017, 12:47 p.m. UTC | #1
It's OK to carry over my review for trivial changes like this.

On Thu, Apr 6, 2017 at 1:48 AM, Balakrishna Garapati
<balakrishna.garapati@linaro.org> wrote:
> makes it easy to define odp_errno to dpdk rteerrno and fixes

> linking issues.

>

> Signed-off-by: Balakrishna Garapati <balakrishna.garapati@linaro.org>


Reviewed-and-tested-by: Bill Fischofer <bill.fischofer@linaro.org>

> ---

>  since v1: Fixed the extra blank line

>  platform/linux-generic/Makefile.am                |  1 +

>  platform/linux-generic/include/odp_errno_define.h | 26 +++++++++++++++++++++++

>  platform/linux-generic/include/odp_internal.h     |  3 +--

>  3 files changed, 28 insertions(+), 2 deletions(-)

>  create mode 100644 platform/linux-generic/include/odp_errno_define.h

>

> diff --git a/platform/linux-generic/Makefile.am b/platform/linux-generic/Makefile.am

> index 37835c3..5452915 100644

> --- a/platform/linux-generic/Makefile.am

> +++ b/platform/linux-generic/Makefile.am

> @@ -125,6 +125,7 @@ noinst_HEADERS = \

>                   ${srcdir}/include/odp_config_internal.h \

>                   ${srcdir}/include/odp_crypto_internal.h \

>                   ${srcdir}/include/odp_debug_internal.h \

> +                 ${srcdir}/include/odp_errno_define.h \

>                   ${srcdir}/include/odp_forward_typedefs_internal.h \

>                   ${srcdir}/include/odp_internal.h \

>                   ${srcdir}/include/odp_name_table_internal.h \

> diff --git a/platform/linux-generic/include/odp_errno_define.h b/platform/linux-generic/include/odp_errno_define.h

> new file mode 100644

> index 0000000..94c30e7

> --- /dev/null

> +++ b/platform/linux-generic/include/odp_errno_define.h

> @@ -0,0 +1,26 @@

> +/* Copyright (c) 2017, Linaro Limited

> + * All rights reserved.

> + *

> + * SPDX-License-Identifier:     BSD-3-Clause

> + */

> +

> +/**

> + * @file

> + *

> + * ODP error number define

> + */

> +

> +#ifndef ODP_ERRNO_DEFINE_H_

> +#define ODP_ERRNO_DEFINE_H_

> +

> +#ifdef __cplusplus

> +extern "C" {

> +#endif

> +

> +extern __thread int __odp_errno;

> +

> +#ifdef __cplusplus

> +}

> +#endif

> +

> +#endif

> diff --git a/platform/linux-generic/include/odp_internal.h b/platform/linux-generic/include/odp_internal.h

> index b313b1f..e1267cf 100644

> --- a/platform/linux-generic/include/odp_internal.h

> +++ b/platform/linux-generic/include/odp_internal.h

> @@ -20,11 +20,10 @@ extern "C" {

>  #include <odp/api/init.h>

>  #include <odp/api/cpumask.h>

>  #include <odp/api/thread.h>

> +#include <odp_errno_define.h>

>  #include <stdio.h>

>  #include <sys/types.h>

>

> -extern __thread int __odp_errno;

> -

>  #define MAX_CPU_NUMBER 128

>

>  typedef struct {

> --

> 1.9.1

>
diff mbox

Patch

diff --git a/platform/linux-generic/Makefile.am b/platform/linux-generic/Makefile.am
index 37835c3..5452915 100644
--- a/platform/linux-generic/Makefile.am
+++ b/platform/linux-generic/Makefile.am
@@ -125,6 +125,7 @@  noinst_HEADERS = \
 		  ${srcdir}/include/odp_config_internal.h \
 		  ${srcdir}/include/odp_crypto_internal.h \
 		  ${srcdir}/include/odp_debug_internal.h \
+		  ${srcdir}/include/odp_errno_define.h \
 		  ${srcdir}/include/odp_forward_typedefs_internal.h \
 		  ${srcdir}/include/odp_internal.h \
 		  ${srcdir}/include/odp_name_table_internal.h \
diff --git a/platform/linux-generic/include/odp_errno_define.h b/platform/linux-generic/include/odp_errno_define.h
new file mode 100644
index 0000000..94c30e7
--- /dev/null
+++ b/platform/linux-generic/include/odp_errno_define.h
@@ -0,0 +1,26 @@ 
+/* Copyright (c) 2017, Linaro Limited
+ * All rights reserved.
+ *
+ * SPDX-License-Identifier:     BSD-3-Clause
+ */
+
+/**
+ * @file
+ *
+ * ODP error number define
+ */
+
+#ifndef ODP_ERRNO_DEFINE_H_
+#define ODP_ERRNO_DEFINE_H_
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+extern __thread int __odp_errno;
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif
diff --git a/platform/linux-generic/include/odp_internal.h b/platform/linux-generic/include/odp_internal.h
index b313b1f..e1267cf 100644
--- a/platform/linux-generic/include/odp_internal.h
+++ b/platform/linux-generic/include/odp_internal.h
@@ -20,11 +20,10 @@  extern "C" {
 #include <odp/api/init.h>
 #include <odp/api/cpumask.h>
 #include <odp/api/thread.h>
+#include <odp_errno_define.h>
 #include <stdio.h>
 #include <sys/types.h>

-extern __thread int __odp_errno;
-
 #define MAX_CPU_NUMBER 128

 typedef struct {