From patchwork Thu Jul 21 12:06:24 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Christophe Milard X-Patchwork-Id: 72557 Delivered-To: patch@linaro.org Received: by 10.140.29.52 with SMTP id a49csp384276qga; Thu, 21 Jul 2016 04:21:22 -0700 (PDT) X-Received: by 10.129.72.134 with SMTP id v128mr32933204ywa.266.1469100082534; Thu, 21 Jul 2016 04:21:22 -0700 (PDT) Return-Path: Received: from lists.linaro.org (lists.linaro.org. [54.225.227.206]) by mx.google.com with ESMTP id s26si4661812qks.54.2016.07.21.04.21.22; Thu, 21 Jul 2016 04:21:22 -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 dis=NONE) header.from=linaro.org Received: by lists.linaro.org (Postfix, from userid 109) id 1E29168203; Thu, 21 Jul 2016 11:21:22 +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, RCVD_IN_DNSWL_LOW, RCVD_IN_MSPIKE_H3, RCVD_IN_MSPIKE_WL, 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 0A4B368986; Thu, 21 Jul 2016 11:09:12 +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 ACC0668225; Thu, 21 Jul 2016 11:08:59 +0000 (UTC) Received: from mail-lf0-f43.google.com (mail-lf0-f43.google.com [209.85.215.43]) by lists.linaro.org (Postfix) with ESMTPS id 1743868225 for ; Thu, 21 Jul 2016 11:07:34 +0000 (UTC) Received: by mail-lf0-f43.google.com with SMTP id l69so58599298lfg.1 for ; Thu, 21 Jul 2016 04:07:34 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=kFSxdIL1JiDiYSvuYxA9pCuD0TVqD9xwPfU5NJPvAus=; b=SRCAewkzRLSxOSd8gVfWNWgn5GmPuGl6Y/6s2PolqxDrOeAL5kVvF0IeCiMszStaQN sO3MUVScJbyibiiYDR3A+EEiHGb7rIG5w7ymvzzoqvzDE9C2bzJ0pLRRYRlYytXBJM4P R+dCrJArmljh+F2HTCoqDSu3BaJVXXECimnLItCBB3sfpUQV+k2uPyJDTesV02Ujr7Jk 5Udz8cWYMcvIeoX4ajRHL2xGpQSLfzIFpualq00bn0Q829lnfmhRGLl38UAoDwzC03jZ b3XUM8UM+d6EqsiM4vjfvL9RxIJspe+sKI8ny6z3LFv+IqACkGQeopvtTl+10qZngWWz tN2A== X-Gm-Message-State: ALyK8tJZaGStRXIkYfVny5cFVv7ZeYbQbsgKSCbwNC85ezCWSl8l3BA9gt/6SVT1Izb3y503frY= X-Received: by 10.46.71.17 with SMTP id u17mr23277456lja.49.1469099252807; Thu, 21 Jul 2016 04:07:32 -0700 (PDT) Received: from erachmi-ericsson.ki.sw.ericsson.se (c-83-233-90-46.cust.bredband2.com. [83.233.90.46]) by smtp.gmail.com with ESMTPSA id i80sm1577861lfg.6.2016.07.21.04.07.31 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Thu, 21 Jul 2016 04:07:32 -0700 (PDT) From: Christophe Milard To: mike.holmes@linaro.org, lng-odp@lists.linaro.org, balakrishna.garapati@linaro.org Date: Thu, 21 Jul 2016 14:06:24 +0200 Message-Id: <1469102786-65530-17-git-send-email-christophe.milard@linaro.org> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1469102786-65530-1-git-send-email-christophe.milard@linaro.org> References: <1469102786-65530-1-git-send-email-christophe.milard@linaro.org> X-Topics: patch Subject: [lng-odp] [API-NEXT PATCHv3 16/18] linux-generic: cosmetic changes on spinlock 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" To please check-patch before the copy to the drv interface. Signed-off-by: Christophe Milard --- include/odp/api/spec/spinlock.h | 7 ------- platform/linux-generic/odp_spinlock.c | 4 ---- 2 files changed, 11 deletions(-) -- 2.7.4 diff --git a/include/odp/api/spec/spinlock.h b/include/odp/api/spec/spinlock.h index 87f9b83..11b7339 100644 --- a/include/odp/api/spec/spinlock.h +++ b/include/odp/api/spec/spinlock.h @@ -4,7 +4,6 @@ * SPDX-License-Identifier: BSD-3-Clause */ - /** * @file * @@ -41,7 +40,6 @@ extern "C" { */ void odp_spinlock_init(odp_spinlock_t *splock); - /** * Acquire spin lock. * @@ -49,7 +47,6 @@ void odp_spinlock_init(odp_spinlock_t *splock); */ void odp_spinlock_lock(odp_spinlock_t *splock); - /** * Try to acquire spin lock. * @@ -60,7 +57,6 @@ void odp_spinlock_lock(odp_spinlock_t *splock); */ int odp_spinlock_trylock(odp_spinlock_t *splock); - /** * Release spin lock. * @@ -68,7 +64,6 @@ int odp_spinlock_trylock(odp_spinlock_t *splock); */ void odp_spinlock_unlock(odp_spinlock_t *splock); - /** * Check if spin lock is busy (locked). * @@ -79,8 +74,6 @@ void odp_spinlock_unlock(odp_spinlock_t *splock); */ int odp_spinlock_is_locked(odp_spinlock_t *splock); - - /** * @} */ diff --git a/platform/linux-generic/odp_spinlock.c b/platform/linux-generic/odp_spinlock.c index 6fc138b..cb0f053 100644 --- a/platform/linux-generic/odp_spinlock.c +++ b/platform/linux-generic/odp_spinlock.c @@ -13,7 +13,6 @@ void odp_spinlock_init(odp_spinlock_t *spinlock) _odp_atomic_flag_init(&spinlock->lock, 0); } - void odp_spinlock_lock(odp_spinlock_t *spinlock) { /* While the lock is already taken... */ @@ -25,19 +24,16 @@ void odp_spinlock_lock(odp_spinlock_t *spinlock) odp_cpu_pause(); } - int odp_spinlock_trylock(odp_spinlock_t *spinlock) { return (_odp_atomic_flag_tas(&spinlock->lock) == 0); } - void odp_spinlock_unlock(odp_spinlock_t *spinlock) { _odp_atomic_flag_clear(&spinlock->lock); } - int odp_spinlock_is_locked(odp_spinlock_t *spinlock) { return _odp_atomic_flag_load(&spinlock->lock) != 0;