From patchwork Fri Oct 20 14:00:08 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Github ODP bot X-Patchwork-Id: 116497 Delivered-To: patch@linaro.org Received: by 10.80.245.45 with SMTP id t42csp8834edm; Fri, 20 Oct 2017 07:02:16 -0700 (PDT) X-Google-Smtp-Source: ABhQp+RzLOaR9W1Dz6s+ffG3GyodOf3ZCiEFJcQU5o44nqSqrU8jEj+QOabOK1jkhs7kBoOpdjg7 X-Received: by 10.233.239.140 with SMTP id d134mr7060915qkg.308.1508508136794; Fri, 20 Oct 2017 07:02:16 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1508508136; cv=none; d=google.com; s=arc-20160816; b=yk2jHKPJpA2Ma9Zmjlrqf8CKvSO9UAGQiZ0FLM/+04a3E1+NgCFtpth1F+wHoqRb2r uyE3nybOuNCTC33IEgngqGZmD7S1FAGsxJXE48zXBgOu+bqQJKuN4sSlDL9uRlTUJna5 Iy+PzFBKumhJN9WsooyBIpMvRi0RV5Ad6bOql3BNeeeOBd+tQqPMjnbOCFdmFIq+TErH wi6a8XXAtM4MhZ2BEFWery20RcOCEjFtyyGQOQe1+hloyNkoY5U6U3OVEVoI/gv2oNt0 07cErmT2rOAv3zDGSfozNocSR+i/s4X4Hr+8AD7L0eVqiX+hMNv9RoNVZAKlV4nT+Znb wJjA== 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=9b60StTe0RVn3BLJi1uJ9k7nGo4iYEXPrTKoDWvOUQU=; b=w/iCPp4oJJFy36XyWmK64peGbAvKXGA6BKwJtQOJ+MWYxeFvLy//H8dlWGV/6drIT7 GBQRmKQRCB0JteLRw/12R4UIyoDr4BZyOjrqf94D4WpAiwjVBPsDTVXxLy8NXRTx4nf+ Ujt+HAGdpSTTDnzrXPuALiZEZ8LqRRl8cVvwVp2AggbC+Zv5KVz/+FXyiHRqd2SQQK8C PK+79up4mu55Z9gBAlXYhQ2GkynUieHhQs8MSUK0brILk82SE2SOmVAgNgVCqhfhAAvx z7DTk0liUoIxlRDZi8BXynZlRWfbogjbkTVt7ENMFeOc/+xUOrfPY10aatiwlf8Jb67+ 2q3g== 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 y4si818619qtk.318.2017.10.20.07.02.16; Fri, 20 Oct 2017 07:02:16 -0700 (PDT) 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 523EE61027; Fri, 20 Oct 2017 14:02:16 +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,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 9A8D860FFD; Fri, 20 Oct 2017 14:00:43 +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 76A6260C9B; Fri, 20 Oct 2017 14:00:21 +0000 (UTC) Received: from forward101o.mail.yandex.net (forward101o.mail.yandex.net [37.140.190.181]) by lists.linaro.org (Postfix) with ESMTPS id A532960C88 for ; Fri, 20 Oct 2017 14:00:18 +0000 (UTC) Received: from mxback13g.mail.yandex.net (mxback13g.mail.yandex.net [IPv6:2a02:6b8:0:1472:2741:0:8b7:92]) by forward101o.mail.yandex.net (Yandex) with ESMTP id 9367E1343311 for ; Fri, 20 Oct 2017 17:00:16 +0300 (MSK) Received: from smtp1p.mail.yandex.net (smtp1p.mail.yandex.net [2a02:6b8:0:1472:2741:0:8b6:6]) by mxback13g.mail.yandex.net (nwsmtp/Yandex) with ESMTP id Q2STKsxcYb-0GvuqoOi; Fri, 20 Oct 2017 17:00:16 +0300 Received: by smtp1p.mail.yandex.net (nwsmtp/Yandex) with ESMTPSA id EU0BCjigMs-0GdeIXKq; Fri, 20 Oct 2017 17:00:16 +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: Fri, 20 Oct 2017 17:00:08 +0300 Message-Id: <1508508011-21260-2-git-send-email-odpbot@yandex.ru> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1508508011-21260-1-git-send-email-odpbot@yandex.ru> References: <1508508011-21260-1-git-send-email-odpbot@yandex.ru> Github-pr-num: 246 Subject: [lng-odp] [PATCH API-NEXT v1 1/4] api: shm: style clean up 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: Petri Savolainen Clean up shm header file. Remove [in] Doxygen tags as function parameters are by default input. Move @note text to the main text block, as it's usual API specification text. Signed-off-by: Petri Savolainen --- /** Email created from pull request 246 (psavol:next-shm-print) ** https://github.com/Linaro/odp/pull/246 ** Patch: https://github.com/Linaro/odp/pull/246.patch ** Base sha: e3108af2f0b58c2ceca422b418439bba5de04b11 ** Merge commit sha: d02ca128bb3e497ed54c1224b5bd9d9f707870b3 **/ include/odp/api/spec/shared_memory.h | 63 +++++++++++++++++++++--------------- 1 file changed, 37 insertions(+), 26 deletions(-) diff --git a/include/odp/api/spec/shared_memory.h b/include/odp/api/spec/shared_memory.h index 1a9c1299e..2c0db1021 100644 --- a/include/odp/api/spec/shared_memory.h +++ b/include/odp/api/spec/shared_memory.h @@ -50,6 +50,7 @@ extern "C" { */ #define ODP_SHM_SW_ONLY 0x1 /**< Application SW only, no HW access */ #define ODP_SHM_PROC 0x2 /**< Share with external processes */ + /** * Single virtual address * @@ -58,6 +59,7 @@ extern "C" { * of ODP thread type (e.g. pthread vs. process (or fork process time)). */ #define ODP_SHM_SINGLE_VA 0x4 + /** * Export memory * @@ -70,11 +72,20 @@ extern "C" { * Shared memory block info */ typedef struct odp_shm_info_t { - const char *name; /**< Block name */ - void *addr; /**< Block address */ - uint64_t size; /**< Block size in bytes */ - uint64_t page_size; /**< Memory page size */ - uint32_t flags; /**< ODP_SHM_* flags */ + /** Block name */ + const char *name; + + /** Block address */ + void *addr; + + /** Block size in bytes */ + uint64_t size; + + /** Memory page size */ + uint64_t page_size; + + /** ODP_SHM_* flags */ + uint32_t flags; } odp_shm_info_t; /** @@ -116,11 +127,10 @@ int odp_shm_capability(odp_shm_capability_t *capa); /** * Reserve a contiguous block of shared memory * - * @param[in] name Name of the block (maximum ODP_SHM_NAME_LEN - 1 chars) - * @param[in] size Block size in bytes - * @param[in] align Block alignment in bytes - * @param[in] flags Shared memory parameter flags (ODP_SHM_*). - * Default value is 0. + * @param name Name of the block (maximum ODP_SHM_NAME_LEN - 1 chars) + * @param size Block size in bytes + * @param align Block alignment in bytes + * @param flags Shared memory parameter flags (ODP_SHM_*). Default value is 0. * * @return Handle of the reserved block * @retval ODP_SHM_INVALID on failure @@ -131,10 +141,10 @@ odp_shm_t odp_shm_reserve(const char *name, uint64_t size, uint64_t align, /** * Free a contiguous block of shared memory * - * Frees a previously reserved block of shared memory. - * @note Freeing memory that is in use will result in UNDEFINED behavior + * Frees a previously reserved block of shared memory. Freeing memory that is + * in use will result in UNDEFINED behavior * - * @param[in] shm Block handle + * @param shm Block handle * * @retval 0 on success * @retval <0 on failure @@ -144,7 +154,7 @@ int odp_shm_free(odp_shm_t shm); /** * Lookup for a block of shared memory * - * @param[in] name Name of the block + * @param name Name of the block * * @return A handle to the block if it is found by name * @retval ODP_SHM_INVALID on failure @@ -177,20 +187,21 @@ odp_shm_t odp_shm_import(const char *remote_name, /** * Shared memory block address * - * @param[in] shm Block handle + * @param shm Block handle * * @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 + * Get information about the specified shared memory block. This is the only + * shared memory API function which accepts invalid shm handles (any bit value) + * without causing undefined behavior. + * + * @param shm Block handle * @param[out] info Block info pointer for output * * @retval 0 on success @@ -207,15 +218,15 @@ void odp_shm_print_all(void); /** * Get printable value for an odp_shm_t * - * @param hdl odp_shm_t handle to be printed - * @return uint64_t value that can be used to print/display this - * handle + * This routine is intended to be used for diagnostic purposes to enable + * applications to generate a printable value that represents an odp_shm_t + * handle. + * + * @param shm Block handle * - * @note This routine is intended to be used for diagnostic purposes - * to enable applications to generate a printable value that represents - * an odp_shm_t handle. + * @return uint64_t value that can be used to print this handle */ -uint64_t odp_shm_to_u64(odp_shm_t hdl); +uint64_t odp_shm_to_u64(odp_shm_t shm); /** * @}