From patchwork Thu Mar 30 13:31:05 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Balakrishna Garapati X-Patchwork-Id: 96292 Delivered-To: patch@linaro.org Received: by 10.140.89.233 with SMTP id v96csp240679qgd; Thu, 30 Mar 2017 06:31:21 -0700 (PDT) X-Received: by 10.55.140.134 with SMTP id o128mr5709543qkd.283.1490880681205; Thu, 30 Mar 2017 06:31:21 -0700 (PDT) Return-Path: Received: from lists.linaro.org (lists.linaro.org. [54.225.227.206]) by mx.google.com with ESMTP id i18si1826470qtc.162.2017.03.30.06.31.20; Thu, 30 Mar 2017 06:31:21 -0700 (PDT) Received-SPF: pass (google.com: domain of lng-odp-bounces@lists.linaro.org designates 54.225.227.206 as permitted sender) client-ip=54.225.227.206; Authentication-Results: mx.google.com; spf=pass (google.com: domain of lng-odp-bounces@lists.linaro.org designates 54.225.227.206 as permitted sender) smtp.mailfrom=lng-odp-bounces@lists.linaro.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: by lists.linaro.org (Postfix, from userid 109) id 8AB6462C4A; Thu, 30 Mar 2017 13:31:20 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on ip-10-142-244-252 X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_NONE, RCVD_IN_MSPIKE_H3, RCVD_IN_MSPIKE_WL autolearn=disabled version=3.4.0 Received: from [127.0.0.1] (localhost [127.0.0.1]) by lists.linaro.org (Postfix) with ESMTP id D8D4460F2C; Thu, 30 Mar 2017 13:31:16 +0000 (UTC) X-Original-To: lng-odp@lists.linaro.org Delivered-To: lng-odp@lists.linaro.org Received: by lists.linaro.org (Postfix, from userid 109) id C989160F45; Thu, 30 Mar 2017 13:31:14 +0000 (UTC) Received: from mail-lf0-f41.google.com (mail-lf0-f41.google.com [209.85.215.41]) by lists.linaro.org (Postfix) with ESMTPS id C5B4A60F28 for ; Thu, 30 Mar 2017 13:31:08 +0000 (UTC) Received: by mail-lf0-f41.google.com with SMTP id j90so26566525lfk.2 for ; Thu, 30 Mar 2017 06:31:08 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:subject:date:message-id; bh=4yt+kII8LMZrIaejXIc92qbiPzsh2mLjxOoy2jyA1Qw=; b=rk82XfszxxQgn1p99j3rebG+gid0tV4NwE1uvIbg4PhDQc2mr/bxEALv2jEuVR4PZ9 gXw+/7EG8mj7/vBFEAfKyG2JFinfcMK20ijeXUpEVRDPYtQZbXluaxuUwKchz7PlqUl3 iFx/dkLE3CQDdtutIsE0wttS1Qgy6XkZXAS+XHjYUn92QNPeiNhcfRHjLE2HAJODyfFO 6uOa3pFtBU9ZcBMfOQ1DAJ0Go25gbfa5ZHj/Dc9f5LpFRrahAB3X5UsV4BOUDyz/4VDc tCCSTnv4nDLdngygaI0B/PuJ5ccVJjLPjC7rXCNLkp0cu1GU36n53vDpgUSuUYcKkoui 0qvQ== X-Gm-Message-State: AFeK/H0a18YkifUMShxNSlM0D0olwpO+cc+2nBF22bh/ERgEhnxNitqnDGWczQ2fzyIYatbImoQJoeZ9b9U= X-Received: by 10.25.195.11 with SMTP id t11mr1727075lff.165.1490880667358; Thu, 30 Mar 2017 06:31:07 -0700 (PDT) Received: from elxahtkds32.localdomain ([95.204.34.162]) by smtp.gmail.com with ESMTPSA id 193sm377037ljj.4.2017.03.30.06.31.06 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Thu, 30 Mar 2017 06:31:06 -0700 (PDT) From: Balakrishna Garapati To: lng-odp@lists.linaro.org Date: Thu, 30 Mar 2017 15:31:05 +0200 Message-Id: <1490880665-2278-1-git-send-email-balakrishna.garapati@linaro.org> X-Mailer: git-send-email 1.9.1 Subject: [lng-odp] [PATCH] linux-generic: decouple odp_errno define from odp-linux X-BeenThere: lng-odp@lists.linaro.org X-Mailman-Version: 2.1.16 Precedence: list List-Id: "The OpenDataPlane \(ODP\) List" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: lng-odp-bounces@lists.linaro.org Sender: "lng-odp" makes it easy to define odp_errno to dpdk rteerrno and fixes linking issues. Signed-off-by: Balakrishna Garapati --- platform/linux-generic/Makefile.am | 1 + platform/linux-generic/include/odp_errno_define.h | 27 +++++++++++++++++++++++ platform/linux-generic/include/odp_internal.h | 3 +-- 3 files changed, 29 insertions(+), 2 deletions(-) create mode 100644 platform/linux-generic/include/odp_errno_define.h -- 1.9.1 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..9baa7d9 --- /dev/null +++ b/platform/linux-generic/include/odp_errno_define.h @@ -0,0 +1,27 @@ +/* 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 #include #include +#include #include #include -extern __thread int __odp_errno; - #define MAX_CPU_NUMBER 128 typedef struct {