From patchwork Fri Oct 27 12:50:02 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: 117337 Delivered-To: patch@linaro.org Received: by 10.140.22.164 with SMTP id 33csp768027qgn; Fri, 27 Oct 2017 06:22:44 -0700 (PDT) X-Google-Smtp-Source: ABhQp+QMDTorbdzFNgeS8dp23EIJcRjJut2mBklKXjIePwi7QRrG3hpKUN3DdHiAQ4hlXyjroQJe X-Received: by 10.55.138.135 with SMTP id m129mr720137qkd.214.1509110564765; Fri, 27 Oct 2017 06:22:44 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1509110564; cv=none; d=google.com; s=arc-20160816; b=QR4WV2wwOdzR6X/taVzMzmcZptpq4XhzszDyieosmQ9erBu4DGF/cnx1RByxLYpbpv jqhZFz6HTi9oCsrOsHA5KEecc+VXK1ye3ZrXDCR3mY0ceMttW09SGVBouqvtTOMmQ+6R 1fY58EbSL0BTM5g9S2Dwzlk3iOlSTkzj4qQaJsIYGcnwMCZW5wtGIC4regM8rpJFsgwN gngP5RLJzLgAF8OG1TbSKsUpTARQQFE4pEMjF/53tMZs/KjVYxCjHMwX7b1JYJW6yOb+ bTah9s/IL68YNE6AVeECQbMwOJMlPFoP25EBwT5bXF4w9ReyK74pSdQYAQqp2aIU4SoA TtjA== 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=yl2MYPlakMfyCBfzNfUqi5vlLM9QSynkMdYnUqd63lA=; b=Ob2cWFlqLyX3VjCUCsEeMPQZqkvoLLfJHxIYWsgd9V3etQnfRHr/Z233x6sp/pWNFj TeGnpy5TiBGHRr/Q4m7c87f2gdygue1QsFz751eCB97bgZL5EzXnDPcaM7A0k34E2dSQ v+3VHFpi9nrPJNZiON6j9iXuhy5vgZXzAHgBE7QUKfIXRNoZqZzbI+AHOcvF+DZ6jjOh PW0RDWNd/EKkhZTEaXijKarj+xTO89lRx7DJDz867h9BDCk1eMh9AL0By2/a+g/38mQn 17PGUDNgtTthGo3zgRDuHmniW+/31rdAGsLG4GMgj7o4xtlw7jYmzcucg9IGOsTHWPb4 GaMQ== 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 j13si3315876qta.263.2017.10.27.06.22.44; Fri, 27 Oct 2017 06:22:44 -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 59C5D629E6; Fri, 27 Oct 2017 13:22:44 +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 4832B62996; Fri, 27 Oct 2017 12:54:07 +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 D5ADF62990; Fri, 27 Oct 2017 12:52:49 +0000 (UTC) Received: from mail-lf0-f65.google.com (mail-lf0-f65.google.com [209.85.215.65]) by lists.linaro.org (Postfix) with ESMTPS id E21B062950 for ; Fri, 27 Oct 2017 12:50:43 +0000 (UTC) Received: by mail-lf0-f65.google.com with SMTP id a2so7279399lfh.11 for ; Fri, 27 Oct 2017 05:50:43 -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=yl2MYPlakMfyCBfzNfUqi5vlLM9QSynkMdYnUqd63lA=; b=MsTCo+MRkd4UCCSbnzsSU16/17L/Pisq6QpLGQfB37/i0xkaSiUVjDjOCOJdc7f0GU r0nVgzstIF7Bjw3/iZjeyRFPhwv2I3uVwJA7UiavlrdWqB3ZlsjB05j3mboKLkFxkMHA aJKzzgZ2ylu3vEwMoBnbY/3lyjSAOurGYWpYcQkZ0H8VRJk1w/ehdPN8bWqUimLGUTrO 005Hn562DriyIDiqQgR94Peyg5duPpMwDiCFji9OfgPvK7SDvXS+5THEdufNF6HRkMkL 9yETa7EQEyURk0IhrZ2s4eS8DLBg+ZOvzaGrByPaRMfkwrPUNlFiG5BUsBFeURJxkC/K 4wbg== X-Gm-Message-State: AMCzsaXAPmWPAtjyY8X0MvBYyeC7zNaw/D26C4sQ8ALpyGBW/wqUenou 1kGGlDX81Q4eMEY4z+yl5/AW2CBF5/ePXA== X-Received: by 10.46.93.75 with SMTP id r72mr165043ljb.182.1509108642223; Fri, 27 Oct 2017 05:50:42 -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.41 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 27 Oct 2017 05:50:41 -0700 (PDT) From: Dmitry Eremin-Solenikov To: lng-odp@lists.linaro.org Date: Fri, 27 Oct 2017 15:50:02 +0300 Message-Id: <20171027125014.27313-19-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 18/30] linux-gen, include: switch atomic.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 --- include/Makefile.am | 1 + include/odp/api/atomic.h | 28 +++++++++++++++ platform/linux-generic/Makefile.am | 3 +- .../odp/api/abi/atomic.h} | 14 ++++++-- platform/linux-generic/include/odp/api/atomic.h | 42 ---------------------- .../linux-generic/include/odp/api/ticketlock.h | 1 + platform/linux-generic/odp_atomic.c | 1 + 7 files changed, 44 insertions(+), 46 deletions(-) create mode 100644 include/odp/api/atomic.h rename platform/linux-generic/{include/odp/api/plat/atomic_types.h => include-abi/odp/api/abi/atomic.h} (86%) delete mode 100644 platform/linux-generic/include/odp/api/atomic.h -- 2.14.2 diff --git a/include/Makefile.am b/include/Makefile.am index 946b7c07cf73..d1eb26bc59c2 100644 --- a/include/Makefile.am +++ b/include/Makefile.am @@ -5,6 +5,7 @@ include_HEADERS = \ odpapiincludedir= $(includedir)/odp/api/ odpapiinclude_HEADERS = \ + odp/api/atomic.h \ odp/api/barrier.h \ odp/api/buffer.h \ odp/api/cpumask.h \ diff --git a/include/odp/api/atomic.h b/include/odp/api/atomic.h new file mode 100644 index 000000000000..8e515ec6f736 --- /dev/null +++ b/include/odp/api/atomic.h @@ -0,0 +1,28 @@ +/* Copyright (c) 2013, Linaro Limited + * All rights reserved. + * + * SPDX-License-Identifier: BSD-3-Clause + */ + +/** + * @file + * + * ODP atomic operations + */ + +#ifndef ODP_API_ATOMIC_H_ +#define ODP_API_ATOMIC_H_ + +#ifdef __cplusplus +extern "C" { +#endif + +#include + +#include + +#ifdef __cplusplus +} +#endif + +#endif diff --git a/platform/linux-generic/Makefile.am b/platform/linux-generic/Makefile.am index 1516f8ee7aee..304ca86862f3 100644 --- a/platform/linux-generic/Makefile.am +++ b/platform/linux-generic/Makefile.am @@ -20,7 +20,6 @@ odpinclude_HEADERS = \ odpapiincludedir= $(includedir)/odp/api odpapiinclude_HEADERS = \ include/odp/api/align.h \ - include/odp/api/atomic.h \ include/odp/api/byteorder.h \ include/odp/api/chksum.h \ include/odp/api/classification.h \ @@ -47,7 +46,6 @@ odpapiinclude_HEADERS = \ odpapiplatincludedir= $(includedir)/odp/api/plat odpapiplatinclude_HEADERS = \ include/odp/api/plat/atomic_inlines.h \ - include/odp/api/plat/atomic_types.h \ include/odp/api/plat/byteorder_inlines.h \ include/odp/api/plat/byteorder_types.h \ include/odp/api/plat/packet_flag_inlines.h \ @@ -68,6 +66,7 @@ nodist_odpapiplatinclude_HEADERS = \ if !ODP_ABI_COMPAT odpapiabiarchincludedir= $(includedir)/odp/api/abi odpapiabiarchinclude_HEADERS = \ + include-abi/odp/api/abi/atomic.h \ include-abi/odp/api/abi/barrier.h \ include-abi/odp/api/abi/buffer.h \ include-abi/odp/api/abi/classification.h \ diff --git a/platform/linux-generic/include/odp/api/plat/atomic_types.h b/platform/linux-generic/include-abi/odp/api/abi/atomic.h similarity index 86% rename from platform/linux-generic/include/odp/api/plat/atomic_types.h rename to platform/linux-generic/include-abi/odp/api/abi/atomic.h index c0803bf11f63..0b7b254ced23 100644 --- a/platform/linux-generic/include/odp/api/plat/atomic_types.h +++ b/platform/linux-generic/include-abi/odp/api/abi/atomic.h @@ -10,8 +10,8 @@ * ODP atomic operations */ -#ifndef ODP_ATOMIC_TYPES_H_ -#define ODP_ATOMIC_TYPES_H_ +#ifndef ODP_API_ABI_ATOMIC_H_ +#define ODP_API_ABI_ATOMIC_H_ #ifdef __cplusplus extern "C" { @@ -59,6 +59,16 @@ typedef struct odp_atomic_u64_s odp_atomic_u64_t; typedef struct odp_atomic_u32_s odp_atomic_u32_t; +/** @ingroup odp_atomic + * @{ + */ + +#include +#include + +/** + * @} + */ #ifdef __cplusplus } #endif diff --git a/platform/linux-generic/include/odp/api/atomic.h b/platform/linux-generic/include/odp/api/atomic.h deleted file mode 100644 index 7886cb4ea382..000000000000 --- a/platform/linux-generic/include/odp/api/atomic.h +++ /dev/null @@ -1,42 +0,0 @@ -/* Copyright (c) 2013, Linaro Limited - * All rights reserved. - * - * SPDX-License-Identifier: BSD-3-Clause - */ - -/** - * @file - * - * ODP atomic operations - */ - -#ifndef ODP_PLAT_ATOMIC_H_ -#define ODP_PLAT_ATOMIC_H_ - -#ifdef __cplusplus -extern "C" { -#endif - -#include -#include - -/** @ingroup odp_atomic - * @{ - */ - -#include -#if ODP_ABI_COMPAT == 0 -#include -#endif - -/** - * @} - */ - -#include - -#ifdef __cplusplus -} -#endif - -#endif diff --git a/platform/linux-generic/include/odp/api/ticketlock.h b/platform/linux-generic/include/odp/api/ticketlock.h index e0f5d81fd6ed..ca12cc37cf9f 100644 --- a/platform/linux-generic/include/odp/api/ticketlock.h +++ b/platform/linux-generic/include/odp/api/ticketlock.h @@ -19,6 +19,7 @@ extern "C" { #include +#include #if ODP_ABI_COMPAT == 0 #include #endif diff --git a/platform/linux-generic/odp_atomic.c b/platform/linux-generic/odp_atomic.c index 53123b675595..1d76caf2b82f 100644 --- a/platform/linux-generic/odp_atomic.c +++ b/platform/linux-generic/odp_atomic.c @@ -7,6 +7,7 @@ #include "config.h" #include +#include #if ODP_ABI_COMPAT == 1 #include #endif