From patchwork Mon Oct 23 11:10:48 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: 116720 Delivered-To: patch@linaro.org Received: by 10.140.22.164 with SMTP id 33csp4549444qgn; Mon, 23 Oct 2017 04:48:29 -0700 (PDT) X-Received: by 10.200.38.118 with SMTP id v51mr19631139qtv.205.1508759309356; Mon, 23 Oct 2017 04:48:29 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1508759309; cv=none; d=google.com; s=arc-20160816; b=c6O6MynSscOdPy02ch+DqvwW4IfIQa3nmHsOVRICZkR3KOkt7O/q0eTsfscDIhDHzL DuLFPb9o5tM2jTUxj5RuqhPN37y2pS3wV7vP5nOB9r/e8BnLWyRq28hONREVUdWnygW7 4UzbNuiPLPIwPS3Cgfr2cAzE2jUZkhsdTOm9lMtinlhipbKwo36FNmbFsgSo7Tb1EzKt yhLFTeaDucTkCArnxFcFSIdp7dT+UEOh3hyo402z+ncq7vG5hLIBxPJpL3ZrkQW0sD20 VjRc2KE3sef3mLS3iCEpG09IpVAWHF7VtjaDSFpQ/uQNsi2OJIJ0wlga4EQPLBaI8PH/ 2DJw== 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=HhDXIJ7rCnFoMTk0JRtnUqLbdNKNHU6ZvmkIiRSiMvFtQFfID+Antk39HjU1WDqHXt 7oSdeMxLrc5wtlic2JtJzvOQ299Q50Rkjqv0mKz5n+SZxn6/HTcqY8MD/409uVBzbg4Z GyZPhCxMrXATTU7VeB0aqUf5w6utjV6rqW5j45lvg6yY/danTJoGvvrjsn/fcGSvsxk2 WU2oWMXH38s+DjZw33rNsHRp/6vCNmoNEBHiv3BafSYH+n2j+OKWxzkbCJCBxyoziw0J 1GL7u2lpVwPJ20mO3QZWzxrDxmzZ9UOpad+WHPjURQV7Bj3B/QWaEBzfWuoO1YZFA4we iMBQ== 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 e3si6009352qtc.337.2017.10.23.04.48.29; Mon, 23 Oct 2017 04:48:29 -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 EFEC0628BA; Mon, 23 Oct 2017 11:48:28 +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 DD51D628BD; Mon, 23 Oct 2017 11:15:18 +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 29D31628A5; Mon, 23 Oct 2017 11:14:45 +0000 (UTC) Received: from mail-lf0-f66.google.com (mail-lf0-f66.google.com [209.85.215.66]) by lists.linaro.org (Postfix) with ESMTPS id 20A9862299 for ; Mon, 23 Oct 2017 11:11:31 +0000 (UTC) Received: by mail-lf0-f66.google.com with SMTP id a16so19649127lfk.0 for ; Mon, 23 Oct 2017 04:11:31 -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=WxppZpGsPHZvoh8HMr6/kQiajsygKP5oCtcxg5JdJhJnwyqwLlAxK6c1H3ly6oIPeQ 131qgJskYDPKTevPs1LNTOjbLeTATGhYoe0B6vwm8rSynZmh5Co7cu+Tl17OVVDPL1F0 yDY5QFGFkQhk+E4tAfrSWO4E6GLVZjC05ReUviTNUJJVU65asMXdD5djRMGB7XRcbJOC RLfweMhEKzoHdwLD+kXt4DamGvTTkBMtO0DYvMjXJIm/r8tfn/9uBabwYxSkxC/4Zw7x vZk8UMaav8nh3TT3wRzpn+Z/RjDhepUTmZHCScV/fk6SwrE1ATXiJutqY31Zo5aH02nc KxoQ== X-Gm-Message-State: AMCzsaWZi5AORyOe8b1d48Ct2A7uv7S2LWHz1z3fxagBgZLgDhKBMFoM zfb+2lkx5m/vdOdNkUe4Tfn6j0nklrNjxw== X-Google-Smtp-Source: ABhQp+QDup7AbNB4VWceuuMw0g/PMQlvpA0jr2ngDDMjQov+5RCY3jr89MtdqoG50ntkAzgtsgUKBQ== X-Received: by 10.25.222.25 with SMTP id v25mr5075927lfg.154.1508757089589; Mon, 23 Oct 2017 04:11:29 -0700 (PDT) Received: from rhovanion.lumag.spb.ru ([94.25.228.135]) by smtp.gmail.com with ESMTPSA id i66sm1854643lji.51.2017.10.23.04.11.28 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 23 Oct 2017 04:11:28 -0700 (PDT) From: Dmitry Eremin-Solenikov To: lng-odp@lists.linaro.org Date: Mon, 23 Oct 2017 14:10:48 +0300 Message-Id: <20171023111057.6328-21-dmitry.ereminsolenikov@linaro.org> X-Mailer: git-send-email 2.14.2 In-Reply-To: <20171023111057.6328-1-dmitry.ereminsolenikov@linaro.org> References: <20171023111057.6328-1-dmitry.ereminsolenikov@linaro.org> Subject: [lng-odp] [PATCH 20/29] 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