From patchwork Thu Feb 5 13:41:02 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ola Liljedahl X-Patchwork-Id: 44427 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-wg0-f70.google.com (mail-wg0-f70.google.com [74.125.82.70]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id 9110E21521 for ; Thu, 5 Feb 2015 13:41:26 +0000 (UTC) Received: by mail-wg0-f70.google.com with SMTP id b13sf5396790wgh.1 for ; Thu, 05 Feb 2015 05:41:25 -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: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=ptRP1BSiC0+jVwU5Dyn1I3mQmBm1/vzW79wiDkKl3hM=; b=Z9zPbF+rObBeq7a8kQdh6oVy0b4svA7oAHvb5mO8ZXj8D+WElFz8QOw2MFiFC/DuvG BaiCum0Iy8iFDjcEdNYhx3CrR1EDPOiA3Wg8b0OOZtFap1DSgdWi/UvDWA3r/ioEuxYn UHRjjHqwGEZdlreb4k56MpPNXPm0SYhkCIr0Rq0XkDym6Af1xhqmcKTtBAmj2hiHHkkR utF0pJoJE5w7PLdEtApxO53oDbFEX3PYyTNZ+Ra2+fgvutM1efx+GeWMEZB/eiTkVqD+ JmatXIc+TywNbE6rB2vXCENgBE0NRM369DlHPRsL1WzTB5CySdTOdtowGwE+BpW4zzLV flUg== X-Gm-Message-State: ALoCoQlxHw5hI4DCFl81112lZcMocFr8IRZUSdAWIBkXRrJj+PpYedw6hIiSmEyWABuHkK/MMMGa X-Received: by 10.152.43.166 with SMTP id x6mr500455lal.3.1423143685199; Thu, 05 Feb 2015 05:41:25 -0800 (PST) X-BeenThere: patchwork-forward@linaro.org Received: by 10.152.43.17 with SMTP id s17ls158562lal.22.gmail; Thu, 05 Feb 2015 05:41:25 -0800 (PST) X-Received: by 10.112.213.38 with SMTP id np6mr3735466lbc.36.1423143684882; Thu, 05 Feb 2015 05:41:24 -0800 (PST) Received: from mail-lb0-f182.google.com (mail-lb0-f182.google.com. [209.85.217.182]) by mx.google.com with ESMTPS id as1si3986517lbc.75.2015.02.05.05.41.24 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 05 Feb 2015 05:41:24 -0800 (PST) Received-SPF: pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.217.182 as permitted sender) client-ip=209.85.217.182; Received: by mail-lb0-f182.google.com with SMTP id l4so7209507lbv.13 for ; Thu, 05 Feb 2015 05:41:24 -0800 (PST) X-Received: by 10.152.21.201 with SMTP id x9mr3647351lae.72.1423143684796; Thu, 05 Feb 2015 05:41:24 -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 h5csp1147439lbj; Thu, 5 Feb 2015 05:41:23 -0800 (PST) X-Received: by 10.140.98.212 with SMTP id o78mr7662771qge.81.1423143683196; Thu, 05 Feb 2015 05:41:23 -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 m10si6044812qac.112.2015.02.05.05.41.21 (version=TLSv1 cipher=RC4-SHA bits=128/128); Thu, 05 Feb 2015 05:41:23 -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 1YJMgJ-00029n-6g; Thu, 05 Feb 2015 13:41:19 +0000 Received: from mail-lb0-f174.google.com ([209.85.217.174]) by ip-10-35-177-41.ec2.internal with esmtp (Exim 4.76) (envelope-from ) id 1YJMgD-00029f-63 for lng-odp@lists.linaro.org; Thu, 05 Feb 2015 13:41:13 +0000 Received: by mail-lb0-f174.google.com with SMTP id f15so7246532lbj.5 for ; Thu, 05 Feb 2015 05:41:07 -0800 (PST) X-Received: by 10.112.92.129 with SMTP id cm1mr3490540lbb.85.1423143667401; Thu, 05 Feb 2015 05:41:07 -0800 (PST) Received: from macmini.lan (78-82-118-111.tn.glocalnet.net. [78.82.118.111]) by mx.google.com with ESMTPSA id oa1sm969035lbc.24.2015.02.05.05.41.06 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Thu, 05 Feb 2015 05:41:06 -0800 (PST) From: Ola Liljedahl To: lng-odp@lists.linaro.org Date: Thu, 5 Feb 2015 14:41:02 +0100 Message-Id: <1423143662-13969-1-git-send-email-ola.liljedahl@linaro.org> X-Mailer: git-send-email 1.9.1 X-Topics: patch Subject: [lng-odp] [PATCHv7] 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.182 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 Also corrected return description of odp_shm_reserve(), it returns ODP_SHM_INVALID (not NULL) on failure. 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..8d8df3f 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 ODP_SHM_INVALID 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 */ 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);