From patchwork Mon Oct 23 10:00:14 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: 116675 Delivered-To: patch@linaro.org Received: by 10.140.22.164 with SMTP id 33csp4461580qgn; Mon, 23 Oct 2017 03:09:29 -0700 (PDT) X-Google-Smtp-Source: ABhQp+SvaCFSu3969T0swNKxehscnFNk1I3/OmAmDPncPLz0nv5SkQ5sX1qJ2N51HllatLM5ihQr X-Received: by 10.200.3.159 with SMTP id t31mr17942257qtg.102.1508753369283; Mon, 23 Oct 2017 03:09:29 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1508753369; cv=none; d=google.com; s=arc-20160816; b=J98idlHSv0tpP31HkRKVqAV1yWWyaOGneudwJW+mnOL3LmQVKAxFkk7veN5WfyTXLD XO3x6LSQUtarfOVCWz7ISoNfl0DXCTAPoYSDqaZqKN2s3hnmdeu6jMNmk2K+F7/jTgyM tbdDd8UZaN5XarrYw29bO9GsryKy6YRKCdf7q6lPBqeaWCvrdzhlGj0IUjTtH39wK6Rx JWthl43S65+X/LOtGvkHvrm4KjUK+LOtaWUDtbujd0+2N/79vV2t0o5HtaJZj/4mU5W9 b4GksKKbS9YzO3EL0LHShwTVLEFVoi/xYV0M5gZaHLUutIEQ2fcvinw+xHhtbrxFkrs9 kULg== 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=c+EZj8IxOCKlcOr9lfi9o8cyWlOaoHWAUWDmdfsQa6k=; b=I4zrEaa1U4O8tekUtnvFFZP4A9kg9k4gEFTmjIKd6j9VWLyI/N5YNQD5kHjMlbQrYj +l8umIfPs1sL+y63C5tO41SyeBkmIUqQM3cMjxZcHDj9FO2giqxzwT1K+KsWnhNK/cjA Zg+4AAvp0kFrhibae2d7JCogbyWh8Vsf+mjWn2OIi9DIU4nfe0GEaqR/2igktRoP8MYt 7ru982dGzP3/3ZYIS9huwBnDL7J8/tOUDuOHUXB2qw4WB/drlxvYSa7D1q/kWo2dBXHP OF7k66CAAmNKFo/JqLieFphPRlMYe/zJwoDIBX6BArY/hAtmbKQeI97WqV7X0ztCkqIi Ph5w== 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 c193si881756qkb.39.2017.10.23.03.09.29; Mon, 23 Oct 2017 03:09:29 -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 02E5061D4C; Mon, 23 Oct 2017 10:09:28 +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,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 6F09161DF1; Mon, 23 Oct 2017 10:04:05 +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 17A5261BC5; Mon, 23 Oct 2017 10:04:01 +0000 (UTC) Received: from forward105p.mail.yandex.net (forward105p.mail.yandex.net [77.88.28.108]) by lists.linaro.org (Postfix) with ESMTPS id 1E0F161BC5 for ; Mon, 23 Oct 2017 10:00:43 +0000 (UTC) Received: from mxback9o.mail.yandex.net (mxback9o.mail.yandex.net [IPv6:2a02:6b8:0:1a2d::23]) by forward105p.mail.yandex.net (Yandex) with ESMTP id 904B84081EEE for ; Mon, 23 Oct 2017 13:00:31 +0300 (MSK) Received: from smtp2p.mail.yandex.net (smtp2p.mail.yandex.net [2a02:6b8:0:1472:2741:0:8b6:7]) by mxback9o.mail.yandex.net (nwsmtp/Yandex) with ESMTP id hHTaCrSfGe-0V4C4egh; Mon, 23 Oct 2017 13:00:31 +0300 Received: by smtp2p.mail.yandex.net (nwsmtp/Yandex) with ESMTPSA id fSL5x6gEpl-0V88RSqr; Mon, 23 Oct 2017 13:00:31 +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: Mon, 23 Oct 2017 13:00:14 +0300 Message-Id: <1508752817-11952-2-git-send-email-odpbot@yandex.ru> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1508752817-11952-1-git-send-email-odpbot@yandex.ru> References: <1508752817-11952-1-git-send-email-odpbot@yandex.ru> Github-pr-num: 246 Subject: [lng-odp] [PATCH API-NEXT v2 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: ec6510b33e8b96d6d6670efb9dc3c9101baed6c6 ** Merge commit sha: fe0769b6e9387bbfabf68b538ec83a685f406da0 **/ 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); /** * @}