From patchwork Thu Dec 4 15:38:53 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ola Liljedahl X-Patchwork-Id: 41943 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-la0-f72.google.com (mail-la0-f72.google.com [209.85.215.72]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id B53E22486D for ; Thu, 4 Dec 2014 15:39:38 +0000 (UTC) Received: by mail-la0-f72.google.com with SMTP id gq15sf11141605lab.3 for ; Thu, 04 Dec 2014 07:39:37 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:delivered-to:from:to:date:message-id:in-reply-to :references:subject:precedence:list-id:list-unsubscribe:list-archive :list-post:list-help:list-subscribe:mime-version:content-type :content-transfer-encoding:errors-to:sender:x-original-sender :x-original-authentication-results:mailing-list; bh=X0I028KlkCn9kMr/WKZ3n9rw4w0jJe4QA82sZyfECTU=; b=SMGq4TIOL1mlcpesP4hBVg9XPCg2ZBhGs/Pc0slhaZbrvE8kcXauKOPTn0OfEPL+t7 kJnwGVJbfpzWguUZsi1druYFNmTZLpcSfQzgBW8IONisaILyD7CpdABAa9xLoJ/1et17 gxuq/5cplTXnbklShhlDKm8LPwuvY8xGdErcBrh0Kchp8oElGCoLJNpOWZrF/2Yq/09T HNB9FStzqE0Qi0g6B0uwx5VUxJvolYdBVESyKunNPOLi4bnWLucB7rnQPvkT1YL6kNpo wNlikSiARlwVclp/fqL08P35vf6GaIa96p1Joq0Y/FOIdmRm+DElTyBiW1fL1jVTDZtW PLuA== X-Gm-Message-State: ALoCoQn3JyyjrWt4MMRcbiSYVgW3oZhOZQJdUqfyYCLamsYEB1oyrXyT/Ytkqhi9UEhNg4cpQmd5 X-Received: by 10.112.72.106 with SMTP id c10mr550951lbv.15.1417707577701; Thu, 04 Dec 2014 07:39:37 -0800 (PST) X-BeenThere: patchwork-forward@linaro.org Received: by 10.152.2.7 with SMTP id 7ls250769laq.88.gmail; Thu, 04 Dec 2014 07:39:37 -0800 (PST) X-Received: by 10.112.158.40 with SMTP id wr8mr8515112lbb.51.1417707577324; Thu, 04 Dec 2014 07:39:37 -0800 (PST) Received: from mail-la0-f48.google.com (mail-la0-f48.google.com. [209.85.215.48]) by mx.google.com with ESMTPS id le3si26291022lac.43.2014.12.04.07.39.37 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Thu, 04 Dec 2014 07:39:37 -0800 (PST) Received-SPF: pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.215.48 as permitted sender) client-ip=209.85.215.48; Received: by mail-la0-f48.google.com with SMTP id gf13so989394lab.21 for ; Thu, 04 Dec 2014 07:39:37 -0800 (PST) X-Received: by 10.152.21.66 with SMTP id t2mr9900308lae.27.1417707577071; Thu, 04 Dec 2014 07:39:37 -0800 (PST) X-Forwarded-To: patchwork-forward@linaro.org X-Forwarded-For: patch@linaro.org patchwork-forward@linaro.org Delivered-To: patch@linaro.org Received: by 10.112.184.201 with SMTP id ew9csp56631lbc; Thu, 4 Dec 2014 07:39:36 -0800 (PST) X-Received: by 10.170.37.2 with SMTP id 2mr15425103ykf.117.1417707575539; Thu, 04 Dec 2014 07:39:35 -0800 (PST) Received: from ip-10-35-177-41.ec2.internal (lists.linaro.org. [54.225.227.206]) by mx.google.com with ESMTPS id x4si31674699qai.81.2014.12.04.07.39.34 for (version=TLSv1 cipher=RC4-SHA bits=128/128); Thu, 04 Dec 2014 07:39:35 -0800 (PST) Received-SPF: none (google.com: lng-odp-bounces@lists.linaro.org does not designate permitted sender hosts) client-ip=54.225.227.206; Received: from localhost ([127.0.0.1] helo=ip-10-35-177-41.ec2.internal) by ip-10-35-177-41.ec2.internal with esmtp (Exim 4.76) (envelope-from ) id 1XwYVB-0004TJ-RF; Thu, 04 Dec 2014 15:39:33 +0000 Received: from mail-lb0-f171.google.com ([209.85.217.171]) by ip-10-35-177-41.ec2.internal with esmtp (Exim 4.76) (envelope-from ) id 1XwYUl-0004PW-Pu for lng-odp@lists.linaro.org; Thu, 04 Dec 2014 15:39:07 +0000 Received: by mail-lb0-f171.google.com with SMTP id n15so14408594lbi.30 for ; Thu, 04 Dec 2014 07:39:02 -0800 (PST) X-Received: by 10.112.129.195 with SMTP id ny3mr10485768lbb.10.1417707542276; Thu, 04 Dec 2014 07:39:02 -0800 (PST) Received: from macmini.lan (84-217-193-77.tn.glocalnet.net. [84.217.193.77]) by mx.google.com with ESMTPSA id zo3sm7411637lbb.10.2014.12.04.07.39.01 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Thu, 04 Dec 2014 07:39:01 -0800 (PST) From: Ola Liljedahl To: lng-odp@lists.linaro.org Date: Thu, 4 Dec 2014 16:38:53 +0100 Message-Id: <1417707535-7632-5-git-send-email-ola.liljedahl@linaro.org> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1417707535-7632-1-git-send-email-ola.liljedahl@linaro.org> References: <1417707535-7632-1-git-send-email-ola.liljedahl@linaro.org> X-Topics: patch Subject: [lng-odp] [PATCHv2 4/6] api:odp_spinlock.h: Update doxygen comments, renaming of function params X-BeenThere: lng-odp@lists.linaro.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: , List-Help: , List-Subscribe: , MIME-Version: 1.0 Errors-To: lng-odp-bounces@lists.linaro.org Sender: lng-odp-bounces@lists.linaro.org X-Removed-Original-Auth: Dkim didn't pass. X-Original-Sender: ola.liljedahl@linaro.org X-Original-Authentication-Results: mx.google.com; spf=pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.215.48 as permitted sender) smtp.mail=patch+caf_=patchwork-forward=linaro.org@linaro.org Mailing-list: list patchwork-forward@linaro.org; contact patchwork-forward+owners@linaro.org X-Google-Group-Id: 836684582541 Signed-off-by: Ola Liljedahl Reviewed-by: Bill Fischofer --- (This code contribution is provided under the terms of agreement LES-LTM-21309) Update and unify doxygen comments and function parameter names. platform/linux-generic/include/api/odp_spinlock.h | 42 ++++++++++++----------- 1 file changed, 22 insertions(+), 20 deletions(-) diff --git a/platform/linux-generic/include/api/odp_spinlock.h b/platform/linux-generic/include/api/odp_spinlock.h index 7c299c8..806cc05 100644 --- a/platform/linux-generic/include/api/odp_spinlock.h +++ b/platform/linux-generic/include/api/odp_spinlock.h @@ -22,60 +22,62 @@ extern "C" { #include /** @addtogroup odp_synchronizers - * Operations on spinlock. + * Operations on spin locks. * @{ */ /** - * ODP spinlock + * ODP spinlock type */ typedef struct odp_spinlock_t { - char lock; /**< @private Lock */ + char lock; /**< @private lock flag, should match odp_atomic_flag_t */ } odp_spinlock_t; /** - * Init spinlock + * Initialize spin lock. * - * @param spinlock Spinlock + * @param splock Pointer to a spin lock */ -void odp_spinlock_init(odp_spinlock_t *spinlock); +void odp_spinlock_init(odp_spinlock_t *splock); /** - * Lock spinlock + * Acquire spin lock. * - * @param spinlock Spinlock + * @param splock Pointer to a spin lock */ -void odp_spinlock_lock(odp_spinlock_t *spinlock); +void odp_spinlock_lock(odp_spinlock_t *splock); /** - * Try to lock spinlock + * Try to acquire spin lock. * - * @param spinlock Spinlock + * @param splock Pointer to a spin lock * - * @return 1 if the lock was taken, otherwise 0. + * @retval 1 lock acquired + * @retval 0 lock not acquired */ -int odp_spinlock_trylock(odp_spinlock_t *spinlock); +int odp_spinlock_trylock(odp_spinlock_t *splock); /** - * Unlock spinlock + * Release spin lock. * - * @param spinlock Spinlock + * @param splock Pointer to a spin lock */ -void odp_spinlock_unlock(odp_spinlock_t *spinlock); +void odp_spinlock_unlock(odp_spinlock_t *splock); /** - * Test if spinlock is locked + * Check if spin lock is busy (locked). * - * @param spinlock Spinlock + * @param splock Pointer to a spin lock * - * @return 1 if the lock is locked, otherwise 0. + * @retval 1 lock busy (locked) + * @retval 0 lock not busy. */ -int odp_spinlock_is_locked(odp_spinlock_t *spinlock); +int odp_spinlock_is_locked(odp_spinlock_t *splock);