From patchwork Fri Oct 27 12:50:04 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dmitry Eremin-Solenikov X-Patchwork-Id: 117344 Delivered-To: patch@linaro.org Received: by 10.140.22.164 with SMTP id 33csp771439qgn; Fri, 27 Oct 2017 06:26:23 -0700 (PDT) X-Google-Smtp-Source: ABhQp+SRgwgsyW0ltVPxlmPHFyoSXfesIkXPmq2F3WMvTCQlOsjQ2BdUm7ptBewlIewwT/2rlYTi X-Received: by 10.55.197.20 with SMTP id p20mr715883qki.229.1509110783687; Fri, 27 Oct 2017 06:26:23 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1509110783; cv=none; d=google.com; s=arc-20160816; b=iwhJmeiAVj1v3FF3DYCHx6NlN8R2wMyKkDSlftn+NV9TvX1B2Vbh71iXErFk3HZ8CX gL8Wh0OkZv90uRJuNOBLUbPkEn42eS9aK5+W4k8oFQxJ+Q7pcAFXdQ6s5CA0ziitI3Lg NVsiIOhxKtbr0pfB98XNny89zzgzJFI19JTFqheNyBhvbfVIg14S4TqO+4SWr9JRUzXz X9En1sXWNa884vwZcBZjqYcjNBvSqfBupF8/y2DSbUz+OTjXf1QUhzutT17ODx7quAda UQIecNkul4ign+4hFwEkScXVw9sgpMyyybMoB0j3X8dKVdvoXaD7gGJ3Mx+vMbIh8+Uo R4rg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:subject:references:in-reply-to :message-id:date:to:from:delivered-to:arc-authentication-results; bh=H/ttiCev6/dMjzGn5tTz3EUTNjq4x1TeEWH7XHs65ws=; b=lNEwbA5p/Hchm5o72M6RN0FF8I3yM2viI8DI0rliOr64KCd87RZwHZ3t1p/w69DmJJ ghi6a/rsNL2h75yx0JcCkuVaoYaaIoIJHlWK652ulyQmXO062KaAfPtkZhjtjY2cKXv8 aN/HCglZVKMBP5U42EN3hGLV2iy3wJvpO4FYXPoXCd5Rs+3M2sapa+dFmqRPI/FPpw3m 3aD9pBRPtwG5CUCoxHGLFlIzGRhMujH8VnwRQYIt27FKPvUS30eLx3O2RwFwE7Yuhh7d yVNa6AOIEuQOB0q09sV5kNXzi7ql58Jok53q3vDNYgx2NoqgzxmvqjB4L2dJnWDynudz Oojg== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of lng-odp-bounces@lists.linaro.org designates 54.197.127.237 as permitted sender) smtp.mailfrom=lng-odp-bounces@lists.linaro.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from lists.linaro.org (ec2-54-197-127-237.compute-1.amazonaws.com. [54.197.127.237]) by mx.google.com with ESMTP id s32si1995860qtd.35.2017.10.27.06.26.23; Fri, 27 Oct 2017 06:26:23 -0700 (PDT) Received-SPF: pass (google.com: domain of lng-odp-bounces@lists.linaro.org designates 54.197.127.237 as permitted sender) client-ip=54.197.127.237; Authentication-Results: mx.google.com; spf=pass (google.com: domain of lng-odp-bounces@lists.linaro.org designates 54.197.127.237 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 5D88D6295C; Fri, 27 Oct 2017 13:26:23 +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.4 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_NONE, RCVD_IN_MSPIKE_H3, RCVD_IN_MSPIKE_WL, RCVD_IN_SORBS_SPAM, URIBL_BLOCKED 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 3AA1E629A8; Fri, 27 Oct 2017 12:54:25 +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 D08C762955; Fri, 27 Oct 2017 12:53:14 +0000 (UTC) Received: from mail-lf0-f68.google.com (mail-lf0-f68.google.com [209.85.215.68]) by lists.linaro.org (Postfix) with ESMTPS id ABED262958 for ; Fri, 27 Oct 2017 12:50:46 +0000 (UTC) Received: by mail-lf0-f68.google.com with SMTP id n69so7304247lfn.2 for ; Fri, 27 Oct 2017 05:50:46 -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:in-reply-to :references; bh=H/ttiCev6/dMjzGn5tTz3EUTNjq4x1TeEWH7XHs65ws=; b=iZUwHOqBBKe8H94Yxi06qf7NTr3BEbN1pf3jpupbyjOc6IhIQ0t5rQjB0zbKlS0mBv Fkm7If1E/H/VyhsSzN23+A+4HvDSDbL7lRNieuTTR4FbpaHBITarSyYYsLh4V+peuiy7 1wzTZ7RCLExh+3EeU381syDKFr06nIwq0M6/3JvZ5Ep46NTgErvWCWa7B3WAghNF4Kdi dvAIKU9CZlpTYHNzsFv3zj0/Z/IBAa7qchK//b8Qi2knSSankBKAJv6pSBjkQdchip3u Ac6yKsiqwQkmF/Rh5TKgryPTtVB0olLq+/CNTOoSwBZ71x2+MJuYJuWAEZ0iWG9n+ToK 6pzg== X-Gm-Message-State: AMCzsaUD7sUDVSR9PUhu/r6HrSa9UKdBFdRC94Kxu8M7vCxH/ssYQVU8 XzMt7DRAAt7YRRynW78M4a4I3XcTCok9Sw== X-Received: by 10.46.27.211 with SMTP id c80mr170415ljf.123.1509108644741; Fri, 27 Oct 2017 05:50:44 -0700 (PDT) Received: from rhovanion.lumag.spb.ru ([94.25.228.222]) by smtp.gmail.com with ESMTPSA id l194sm1584690lfl.11.2017.10.27.05.50.43 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 27 Oct 2017 05:50:44 -0700 (PDT) From: Dmitry Eremin-Solenikov To: lng-odp@lists.linaro.org Date: Fri, 27 Oct 2017 15:50:04 +0300 Message-Id: <20171027125014.27313-21-dmitry.ereminsolenikov@linaro.org> X-Mailer: git-send-email 2.14.2 In-Reply-To: <20171027125014.27313-1-dmitry.ereminsolenikov@linaro.org> References: <20171027125014.27313-1-dmitry.ereminsolenikov@linaro.org> Subject: [lng-odp] [PATCH v10 20/30] linux-gen, include: switch std_clib.h to api+abi 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" Signed-off-by: Dmitry Eremin-Solenikov --- example/traffic_mgmt/odp_traffic_mgmt.c | 1 + helper/test/linux/process.c | 2 ++ helper/test/linux/pthread.c | 2 ++ helper/threads.c | 1 + include/Makefile.am | 1 + include/odp/api/std_clib.h | 24 ++++++++++++++++++++++ platform/linux-generic/Makefile.am | 2 +- .../odp/api => include-abi/odp/api/abi}/std_clib.h | 17 ++++++++------- .../include/odp/api/plat/std_clib_inlines.h | 1 - platform/linux-generic/odp_std_clib.c | 1 + 10 files changed, 41 insertions(+), 11 deletions(-) create mode 100644 include/odp/api/std_clib.h rename platform/linux-generic/{include/odp/api => include-abi/odp/api/abi}/std_clib.h (60%) -- 2.14.2 diff --git a/example/traffic_mgmt/odp_traffic_mgmt.c b/example/traffic_mgmt/odp_traffic_mgmt.c index 1f1102ddfdaf..e02a1af8dc3f 100644 --- a/example/traffic_mgmt/odp_traffic_mgmt.c +++ b/example/traffic_mgmt/odp_traffic_mgmt.c @@ -10,6 +10,7 @@ #include #include +#include #include #include #include diff --git a/helper/test/linux/process.c b/helper/test/linux/process.c index 12504d01bd9f..3ed2032b0c59 100644 --- a/helper/test/linux/process.c +++ b/helper/test/linux/process.c @@ -11,6 +11,8 @@ #include #include +#include + #define NUMBER_WORKERS 16 /* 0 = max */ static void *worker_fn(void *arg ODPH_UNUSED) diff --git a/helper/test/linux/pthread.c b/helper/test/linux/pthread.c index a50df027f3f2..0863283d60aa 100644 --- a/helper/test/linux/pthread.c +++ b/helper/test/linux/pthread.c @@ -10,6 +10,8 @@ #include #include +#include + #define NUMBER_WORKERS 16 static void *worker_fn(void *arg ODPH_UNUSED) { diff --git a/helper/threads.c b/helper/threads.c index a83014d424de..32a092825084 100644 --- a/helper/threads.c +++ b/helper/threads.c @@ -10,6 +10,7 @@ #define _GNU_SOURCE #endif #include +#include #include #include #include diff --git a/include/Makefile.am b/include/Makefile.am index 229f47fc7173..6b3d12f793a4 100644 --- a/include/Makefile.am +++ b/include/Makefile.am @@ -22,6 +22,7 @@ odpapiinclude_HEADERS = \ odp/api/shared_memory.h \ odp/api/spinlock.h \ odp/api/spinlock_recursive.h \ + odp/api/std_clib.h \ odp/api/std_types.h \ odp/api/thread.h \ odp/api/thrmask.h \ diff --git a/include/odp/api/std_clib.h b/include/odp/api/std_clib.h new file mode 100644 index 000000000000..fde1c1dd3a4a --- /dev/null +++ b/include/odp/api/std_clib.h @@ -0,0 +1,24 @@ +/* Copyright (c) 2015, Linaro Limited + * All rights reserved. + * + * SPDX-License-Identifier: BSD-3-Clause + */ + +#ifndef ODP_API_STD_CLIB_H_ +#define ODP_API_STD_CLIB_H_ + +#ifdef __cplusplus +extern "C" { +#endif + +#include + +#include + +#include + +#ifdef __cplusplus +} +#endif + +#endif diff --git a/platform/linux-generic/Makefile.am b/platform/linux-generic/Makefile.am index 966fc13f5c02..cdb45d8e0c9a 100644 --- a/platform/linux-generic/Makefile.am +++ b/platform/linux-generic/Makefile.am @@ -36,7 +36,6 @@ odpapiinclude_HEADERS = \ include/odp/api/packet_io.h \ include/odp/api/packet_io_stats.h \ include/odp/api/random.h \ - include/odp/api/std_clib.h \ include/odp/api/support.h \ include/odp/api/sync.h \ include/odp/api/system_info.h \ @@ -84,6 +83,7 @@ odpapiabiarchinclude_HEADERS = \ include-abi/odp/api/abi/shared_memory.h \ include-abi/odp/api/abi/spinlock.h \ include-abi/odp/api/abi/spinlock_recursive.h \ + include-abi/odp/api/abi/std_clib.h \ include-abi/odp/api/abi/std_types.h \ include-abi/odp/api/abi/thread.h \ include-abi/odp/api/abi/thrmask.h \ diff --git a/platform/linux-generic/include/odp/api/std_clib.h b/platform/linux-generic/include-abi/odp/api/abi/std_clib.h similarity index 60% rename from platform/linux-generic/include/odp/api/std_clib.h rename to platform/linux-generic/include-abi/odp/api/abi/std_clib.h index fea4725437e7..b31034df4705 100644 --- a/platform/linux-generic/include/odp/api/std_clib.h +++ b/platform/linux-generic/include-abi/odp/api/abi/std_clib.h @@ -4,22 +4,21 @@ * SPDX-License-Identifier: BSD-3-Clause */ -#ifndef ODP_PLAT_STD_CLIB_H_ -#define ODP_PLAT_STD_CLIB_H_ +/** + * @file + * + * ODP barrier + */ + +#ifndef ODP_API_ABI_STD_CLIB_H_ +#define ODP_API_ABI_STD_CLIB_H_ #ifdef __cplusplus extern "C" { #endif -#include -#include - #include -#if ODP_ABI_COMPAT == 0 #include -#endif - -#include #ifdef __cplusplus } diff --git a/platform/linux-generic/include/odp/api/plat/std_clib_inlines.h b/platform/linux-generic/include/odp/api/plat/std_clib_inlines.h index 8f505d079c33..bb6f9d02b29e 100644 --- a/platform/linux-generic/include/odp/api/plat/std_clib_inlines.h +++ b/platform/linux-generic/include/odp/api/plat/std_clib_inlines.h @@ -11,7 +11,6 @@ extern "C" { #endif -#include #include _ODP_INLINE void *odp_memcpy(void *dst, const void *src, size_t num) diff --git a/platform/linux-generic/odp_std_clib.c b/platform/linux-generic/odp_std_clib.c index ed7c6446b556..38406b86b3c4 100644 --- a/platform/linux-generic/odp_std_clib.c +++ b/platform/linux-generic/odp_std_clib.c @@ -7,6 +7,7 @@ #include "config.h" #include +#include #if ODP_ABI_COMPAT == 1 #include #endif