From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from out3-smtp.messagingengine.com (out3-smtp.messagingengine.com [66.111.4.27]) by dpdk.org (Postfix) with ESMTP id 240B556A3 for ; Mon, 22 Oct 2018 14:31:36 +0200 (CEST) Received: from compute1.internal (compute1.nyi.internal [10.202.2.41]) by mailout.nyi.internal (Postfix) with ESMTP id BE00D22084; Mon, 22 Oct 2018 08:31:35 -0400 (EDT) Received: from mailfrontend1 ([10.202.2.162]) by compute1.internal (MEProxy); Mon, 22 Oct 2018 08:31:35 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=monjalon.net; h= from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; s=mesmtp; bh=xHdGx5nlWB cK2orD7tyqifxmzZRTx536xUTbg1ZtRhs=; b=mhcxFBsoE/Z5gew6mRgFWbh/Vj BHk4FN56+n+Xhg6fUH9cXfDtHzKHAtFZldka2cWjwCLhtWSafNKRtGAs60cDo9Us oUlip00sR9HROmMD/2TmZhtOd5ZTa+pyqr7I6EY2X+xhE7iQSgviWkITcvJURNbT iMbBbk9hN9VDkfY3c= DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-transfer-encoding:date:from :in-reply-to:message-id:mime-version:references:subject:to :x-me-proxy:x-me-proxy:x-me-sender:x-me-sender:x-sasl-enc; s= fm1; bh=xHdGx5nlWBcK2orD7tyqifxmzZRTx536xUTbg1ZtRhs=; b=MKukz67l /IkH92ozTyioIGWQ//bvfyDdi9CKCeruRaMWj8ccenkqlgYEdm3oCjVFeVjwdI+U UE1IXuix+tG1pcdrkrj9gQMQhzPmqZ1wmc8YXxAYchxbPzjNGzAUVxNbetguhuXt I5eQ3cj3BUyguDdIagVt1qoblZfOmlABYPkvhzGH2zIK/Nr8n4yZjpJiosTJ6KxT nd58bL5jchI5P7Nfk4t28bn/41cnVUuZLY7WlxgByozx4Ro4xFCQSv9So3hz4dIL t2xAveI418rm9f/xKPQl7dp49m4dIDvCfYV+vjG/8JFELV2+Ma5+ZWjaSBZW2CyY +9IS8WZv405YbQ== X-ME-Sender: X-ME-Proxy: Received: from xps.monjalon.net (184.203.134.77.rev.sfr.net [77.134.203.184]) by mail.messagingengine.com (Postfix) with ESMTPA id B2568E4894; Mon, 22 Oct 2018 08:31:34 -0400 (EDT) From: Thomas Monjalon To: dev@dpdk.org Cc: gaetan.rivet@6wind.com, ophirmu@mellanox.com, wisamm@mellanox.com, ferruh.yigit@intel.com, arybchenko@solarflare.com, bernard.iremonger@intel.com Date: Mon, 22 Oct 2018 14:31:07 +0200 Message-Id: <20181022123110.5733-5-thomas@monjalon.net> X-Mailer: git-send-email 2.19.0 In-Reply-To: <20181022123110.5733-1-thomas@monjalon.net> References: <20181007222554.4886-1-thomas@monjalon.net> <20181022123110.5733-1-thomas@monjalon.net> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Subject: [dpdk-dev] [PATCH v6 4/7] doc: replace doxygen example in contribution guide X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 22 Oct 2018 12:31:36 -0000 The provided example of doxygen header is about a deprecated function. It is replaced by rte_spinlock_trylock() which is small and good enough for the purpose. Signed-off-by: Thomas Monjalon Reviewed-by: Andrew Rybchenko --- doc/guides/contributing/documentation.rst | 15 +++++---------- 1 file changed, 5 insertions(+), 10 deletions(-) diff --git a/doc/guides/contributing/documentation.rst b/doc/guides/contributing/documentation.rst index 097575ad7..0165990ed 100644 --- a/doc/guides/contributing/documentation.rst +++ b/doc/guides/contributing/documentation.rst @@ -615,19 +615,14 @@ The following are some guidelines for use of Doxygen in the DPDK API documentati .. code-block:: c /** - * Attach a new Ethernet device specified by arguments. - * - * @param devargs - * A pointer to a strings array describing the new device - * to be attached. The strings should be a pci address like - * `0000:01:00.0` or **virtual** device name like `net_pcap0`. - * @param port_id - * A pointer to a port identifier actually attached. + * Try to take the lock. * + * @param sl + * A pointer to the spinlock. * @return - * 0 on success and port_id is filled, negative on error. + * 1 if the lock is successfully taken; 0 otherwise. */ - int rte_eth_dev_attach(const char *devargs, uint8_t *port_id); + int rte_spinlock_trylock(rte_spinlock_t *sl); * Doxygen supports Markdown style syntax such as bold, italics, fixed width text and lists. For example the second line in the ``devargs`` parameter in the previous example will be rendered as: -- 2.19.0