From patchwork Wed Feb 4 21:07:28 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ola Liljedahl X-Patchwork-Id: 44390 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 6443221173 for ; Wed, 4 Feb 2015 21:08:20 +0000 (UTC) Received: by mail-la0-f72.google.com with SMTP id gq15sf2910166lab.3 for ; Wed, 04 Feb 2015 13:08:19 -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=pq3NO8d44cL74alXwsOIsPWQr8ziKf8sXrQLTv3Xtnc=; b=N4Pqi04zk3EtwKDnD2SDYFj90cvgPcigk1aSKRxZUroe3MTwdIjGOwlzF3RnHZWM6p /Bw7Eh6s24yxc+SFU/P/KMFS4JmAh38OesYOnbvZaryRKq/a8EjDYtpy+reHNnVbCYHf EJetQElCWXnr/UDYh5mUbOGlO10JaMe5Vrh5rOin0z7nYx8HQ6lV2zcP8dehTEKVfq4y DNZYjmhgeUeUC1z5aDvTO0VTNfBzMfdK2/rM2hlmQr5zmII8eb7igTdeWnAFi7EsgJ14 vr757JyS+ts9TsXoJdYXWHWVSb4bvwCEq2S1l1rLECvAyEg5plO1/SRjex/F1SeTtbt2 /e0Q== X-Gm-Message-State: ALoCoQnFLSCL/fe+Mp0ym3wstmKgDYoPBkDxHOQetrU2ODvs7J/wydEp2ypvMQqN8H4wO0Zzb6TT X-Received: by 10.112.160.3 with SMTP id xg3mr36185lbb.5.1423084099008; Wed, 04 Feb 2015 13:08:19 -0800 (PST) X-BeenThere: patchwork-forward@linaro.org Received: by 10.152.120.137 with SMTP id lc9ls76360lab.28.gmail; Wed, 04 Feb 2015 13:08:18 -0800 (PST) X-Received: by 10.152.4.233 with SMTP id n9mr246471lan.61.1423084098852; Wed, 04 Feb 2015 13:08:18 -0800 (PST) Received: from mail-lb0-f181.google.com (mail-lb0-f181.google.com. [209.85.217.181]) by mx.google.com with ESMTPS id a10si2471613lab.4.2015.02.04.13.08.18 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 04 Feb 2015 13:08:18 -0800 (PST) Received-SPF: pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.217.181 as permitted sender) client-ip=209.85.217.181; Received: by mail-lb0-f181.google.com with SMTP id u10so3732887lbd.12 for ; Wed, 04 Feb 2015 13:08:18 -0800 (PST) X-Received: by 10.152.23.195 with SMTP id o3mr345466laf.70.1423084098755; Wed, 04 Feb 2015 13:08:18 -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.35.133 with SMTP id h5csp743911lbj; Wed, 4 Feb 2015 13:08:17 -0800 (PST) X-Received: by 10.224.115.16 with SMTP id g16mr387201qaq.97.1423084097286; Wed, 04 Feb 2015 13:08:17 -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 k13si3348802qae.95.2015.02.04.13.08.16 (version=TLSv1 cipher=RC4-SHA bits=128/128); Wed, 04 Feb 2015 13:08:17 -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 1YJ7BG-0006tP-HP; Wed, 04 Feb 2015 21:08:14 +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 1YJ7Aq-0006oh-R3 for lng-odp@lists.linaro.org; Wed, 04 Feb 2015 21:07:48 +0000 Received: by mail-lb0-f171.google.com with SMTP id u14so3760924lbd.2 for ; Wed, 04 Feb 2015 13:07:43 -0800 (PST) X-Received: by 10.112.162.167 with SMTP id yb7mr338441lbb.76.1423084063315; Wed, 04 Feb 2015 13:07:43 -0800 (PST) Received: from macmini.lan (78-82-118-111.tn.glocalnet.net. [78.82.118.111]) by mx.google.com with ESMTPSA id r7sm567954lbs.37.2015.02.04.13.07.42 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Wed, 04 Feb 2015 13:07:42 -0800 (PST) From: Ola Liljedahl To: lng-odp@lists.linaro.org Date: Wed, 4 Feb 2015 22:07:28 +0100 Message-Id: <1423084051-12962-7-git-send-email-ola.liljedahl@linaro.org> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1423084051-12962-1-git-send-email-ola.liljedahl@linaro.org> References: <1423084051-12962-1-git-send-email-ola.liljedahl@linaro.org> X-Topics: patch Subject: [lng-odp] [PATCHv6 6/9] api: odp_shared_memory.h: updated return descriptions 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.217.181 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 --- (This document/code contribution attached is provided under the terms of agreement LES-LTM-21309) include/odp/api/shared_memory.h | 18 +++++++++++------- 1 file changed, 11 insertions(+), 7 deletions(-) diff --git a/include/odp/api/shared_memory.h b/include/odp/api/shared_memory.h index d4445f7..78e11a5 100644 --- a/include/odp/api/shared_memory.h +++ b/include/odp/api/shared_memory.h @@ -71,7 +71,8 @@ typedef struct odp_shm_info_t { * @param[in] flags Shared memory parameter flags (ODP_SHM_*). * Default value is 0. * - * @return Pointer to the reserved block, or NULL + * @return Handle of the reserved block + * @retval NULL on failure */ odp_shm_t odp_shm_reserve(const char *name, uint64_t size, uint64_t align, uint32_t flags); @@ -84,9 +85,8 @@ odp_shm_t odp_shm_reserve(const char *name, uint64_t size, uint64_t align, * * @param[in] shm Block handle * - * @retval 0 if the handle is already free - * @retval 0 if the handle free succeeds - * @retval -1 on failure to free the handle + * @retval 0 on success + * @retval <0 on failure to free the handle */ int odp_shm_free(odp_shm_t shm); @@ -96,7 +96,7 @@ int odp_shm_free(odp_shm_t shm); * @param[in] name Name of the block * * @return A handle to the block if it is found by name - * @retval #ODP_SHM_INVALID if the block is not found + * @retval ODP_SHM_INVALID on failure */ odp_shm_t odp_shm_lookup(const char *name); @@ -106,18 +106,22 @@ odp_shm_t odp_shm_lookup(const char *name); * * @param[in] shm Block handle * - * @return Memory block address, or NULL on error + * @return Memory block address + * @retval NULL on failure */ void *odp_shm_addr(odp_shm_t shm); /** * Shared memory block info + * @note This is the only shared memory API function which accepts invalid + * shm handles (any bit value) without causing undefined behavior. * * @param[in] shm Block handle * @param[out] info Block info pointer for output * - * @return 0 on success, otherwise non-zero + * @retval 0 on success + * @retval <0 on failure */ int odp_shm_info(odp_shm_t shm, odp_shm_info_t *info);