From patchwork Mon Jan 22 09:00:07 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Github ODP bot X-Patchwork-Id: 125348 Delivered-To: patch@linaro.org Received: by 10.46.66.141 with SMTP id h13csp1043923ljf; Mon, 22 Jan 2018 01:01:10 -0800 (PST) X-Google-Smtp-Source: AH8x225X2NkOp+LhuVPAsVy7pf6ikuUevXtUhkQIaPSBHEDCQygwYQM9G5xHSKU9GuBLG7MnCq5P X-Received: by 10.237.36.152 with SMTP id t24mr10616633qtc.136.1516611670755; Mon, 22 Jan 2018 01:01:10 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1516611670; cv=none; d=google.com; s=arc-20160816; b=P/Zl+EkrDGNzfYCLv6922HoRP2PCjC4V7g+n8Qfp9OtBH4KxFDLwSr048R1eo8aF8J KmSSmpIlBftYZyZJUgo727lBO/2TT4kxH+Vtmu5cTj1jJN300sVa9IVz17xx10s0b11s l3tlxuxQHJz7iQehXLMCH+tWRFLgW/OHb1afz71F5t3g+FylB2gAkpFLwu673cG60o8O pTV3tl73iR02vsRUhyv3Zr9voIelViX1tyQg1rHjSNT6mfv80vP41x6UYklk981GhxRM 9ZksNlcrwN8G+gCTJ93MbvrfQf1BtjAvl5NfbzdAI7qU2a33tN57FgkeczVqbSqpo+sY x/+Q== 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:github-pr-num :references:in-reply-to:message-id:date:to:from:delivered-to :arc-authentication-results; bh=h2JOO7CCW3kSBlZu5W0c/4nmTL6rP8oizeZODamyb40=; b=xGvcVmuNr5Jt1g4KXoSNCkoN0F4NwsU4R6sV/XhCXyBSdmAWIO+T3FHcyRvZ6S3Gyf i+/OW0ouqEvtAf4Dw44prIKSWBDsHN6e6Gkwlbjl/Xtbcae7B6rIGityqxbw2TuEcsAY qw+EcDWV7zSS1LOHoS62cw05ntJe3jsmxck0ovOMmNlM3mP1SGbCHDMAcQWEtnpPai2X 4gJ3NeuGPdM7RSvfISjCPv6zrA0mVYB7E3UkTuaGQg3j3ZGo32zJO7zEmHUrAIOif/qr r3v1NzySPuCDETcAfYJvNOS53YKZKJDiSLJQFWofXK5lolVrfR5OJpErdMPxmzvRS3Po YLSg== 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=fail (p=NONE sp=NONE dis=NONE) header.from=yandex.ru 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 g24si2166957qte.120.2018.01.22.01.01.10; Mon, 22 Jan 2018 01:01:10 -0800 (PST) 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=fail (p=NONE sp=NONE dis=NONE) header.from=yandex.ru Received: by lists.linaro.org (Postfix, from userid 109) id 6479F61735; Mon, 22 Jan 2018 09:01:10 +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=-2.6 required=5.0 tests=BAYES_00,FREEMAIL_FROM, RCVD_IN_DNSWL_LOW, RCVD_IN_MSPIKE_H2 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 05F8361782; Mon, 22 Jan 2018 09:00:28 +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 026EE61750; Mon, 22 Jan 2018 09:00:17 +0000 (UTC) Received: from forward105p.mail.yandex.net (forward105p.mail.yandex.net [77.88.28.108]) by lists.linaro.org (Postfix) with ESMTPS id B7A2060905 for ; Mon, 22 Jan 2018 09:00:11 +0000 (UTC) Received: from mxback12j.mail.yandex.net (mxback12j.mail.yandex.net [IPv6:2a02:6b8:0:1619::87]) by forward105p.mail.yandex.net (Yandex) with ESMTP id 877CD4081637 for ; Mon, 22 Jan 2018 12:00:10 +0300 (MSK) Received: from smtp4o.mail.yandex.net (smtp4o.mail.yandex.net [2a02:6b8:0:1a2d::28]) by mxback12j.mail.yandex.net (nwsmtp/Yandex) with ESMTP id ay3KSG6ITv-09auC9dn; Mon, 22 Jan 2018 12:00:10 +0300 Received: by smtp4o.mail.yandex.net (nwsmtp/Yandex) with ESMTPSA id JOpfK4aznV-08QSoEZL; Mon, 22 Jan 2018 12:00:08 +0300 (using TLSv1.2 with cipher ECDHE-RSA-AES128-SHA256 (128/128 bits)) (Client certificate not present) From: Github ODP bot To: lng-odp@lists.linaro.org Date: Mon, 22 Jan 2018 12:00:07 +0300 Message-Id: <1516611607-31105-2-git-send-email-odpbot@yandex.ru> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1516611607-31105-1-git-send-email-odpbot@yandex.ru> References: <1516611607-31105-1-git-send-email-odpbot@yandex.ru> Github-pr-num: 414 Subject: [lng-odp] [PATCH API-NEXT v1 1/1] mergefix: remove atomic_types.h 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" From: Maxim Uvarov delete platform/linux-generic/include/odp/api/plat/atomic_types.h as not used and removed with: 47932d2 linux-gen, include: switch atomic.h to api+abi Signed-off-by: Maxim Uvarov --- /** Email created from pull request 414 (muvarov:devel/api-next_mergefix) ** https://github.com/Linaro/odp/pull/414 ** Patch: https://github.com/Linaro/odp/pull/414.patch ** Base sha: f925f103c90591776f73863d30159357b08bf71e ** Merge commit sha: 149ff0a36f15c0521799b7ba9c8de7a523bbfd34 **/ .../include/odp/api/plat/atomic_types.h | 88 ---------------------- 1 file changed, 88 deletions(-) delete mode 100644 platform/linux-generic/include/odp/api/plat/atomic_types.h diff --git a/platform/linux-generic/include/odp/api/plat/atomic_types.h b/platform/linux-generic/include/odp/api/plat/atomic_types.h deleted file mode 100644 index bc3b9466e..000000000 --- a/platform/linux-generic/include/odp/api/plat/atomic_types.h +++ /dev/null @@ -1,88 +0,0 @@ -/* Copyright (c) 2015-2018, Linaro Limited - * All rights reserved. - * - * SPDX-License-Identifier: BSD-3-Clause - */ - -/** - * @file - * - * ODP atomic operations - */ - -#ifndef ODP_ATOMIC_TYPES_H_ -#define ODP_ATOMIC_TYPES_H_ - -#ifdef __cplusplus -extern "C" { -#endif - -#include -#include - -/** - * @internal - * Atomic 64-bit unsigned integer - */ -struct odp_atomic_u64_s { - uint64_t v; /**< Actual storage for the atomic variable */ -#if __GCC_ATOMIC_LLONG_LOCK_FREE < 2 - /* Some architectures do not support lock-free operations on 64-bit - * data types. We use a spin lock to ensure atomicity. */ - char lock; /**< Spin lock (if needed) used to ensure atomic access */ -#endif -} ODP_ALIGNED(sizeof(uint64_t)); /* Enforce alignement! */ - -/** - * @internal - * Atomic 32-bit unsigned integer - */ -struct odp_atomic_u32_s { - uint32_t v; /**< Actual storage for the atomic variable */ -} ODP_ALIGNED(sizeof(uint32_t)); /* Enforce alignement! */ - -#if __GCC_ATOMIC_LLONG_LOCK_FREE < 2 - -/** - * @internal - * CAS operation expression for the ATOMIC_OP macro - */ -#define ATOMIC_CAS_OP(ret_ptr, old_val, new_val) \ -({ \ - if (atom->v == (old_val)) { \ - atom->v = (new_val); \ - *(ret_ptr) = 1; \ - } else { \ - *(ret_ptr) = 0; \ - } \ -}) - -/** - * @internal - * Helper macro for lock-based atomic operations on 64-bit integers - * @param[in,out] atom Pointer to the 64-bit atomic variable - * @param expr Expression used update the variable. - * @return The old value of the variable. - */ -#define ATOMIC_OP(atom, expr) \ -({ \ - uint64_t _old_val; \ - /* Loop while lock is already taken, stop when lock becomes clear */ \ - while (__atomic_test_and_set(&(atom)->lock, __ATOMIC_ACQUIRE)) \ - (void)0; \ - _old_val = (atom)->v; \ - (expr); /* Perform whatever update is desired */ \ - __atomic_clear(&(atom)->lock, __ATOMIC_RELEASE); \ - _old_val; /* Return old value */ \ -}) -#endif - -typedef struct odp_atomic_u64_s odp_atomic_u64_t; - -typedef struct odp_atomic_u32_s odp_atomic_u32_t; - -#ifdef __cplusplus -} -#endif - -#endif