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 2FF581B113 for ; Thu, 18 Oct 2018 03:35:26 +0200 (CEST) Received: from compute1.internal (compute1.nyi.internal [10.202.2.41]) by mailout.nyi.internal (Postfix) with ESMTP id CEB4121F86; Wed, 17 Oct 2018 21:35:25 -0400 (EDT) Received: from mailfrontend1 ([10.202.2.162]) by compute1.internal (MEProxy); Wed, 17 Oct 2018 21:35:25 -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=LiGdkOHK85WZDvKQlK2HppcnQo N2E8QlZ64JHarPJk+CHFOR30baCGwaC0gndoVE4ZqUklqjGmYKNfv1tBorQXheBY N1A4GvMDfvIR36MEtUCnBjcM5gLT4kuqJ9HyWkQLnP+j3RgofI9/diQdM0vj5g1J RjWhCJq6q7wPJbrGk= 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=s5+VdKOf og63wfe8S1HPppSAZGKlWH37tS/v96VWX5i+5QOfG8Meb7/AJAyBqqQ4kLaSG4/c u9IrzMOBzA8V+Xh3Z1d8oV7oOa7HxVl57l0N9lNXrD+oC91LfwF7ch/RGXbJtlMx NDekySlozyDAifmMdwfCy3pmV7vUgXZZHB59CykH4KWedG4VkAQHgMYH37Vs69RV vCUt8Yj8NR7twkyjWAAlozQdJnq4DPXH/NMdfRnPwZa+pTDH7N4hGvSsD58bET7F 3qYSZM4bYf2ynWOu3Z5KKtoLgV2w0EKNp4f6QwTvEaaBKwd+rDifQJXywNj2WO/U IBuOK+7oBf2zlQ== 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 C2B4BE462B; Wed, 17 Oct 2018 21:35:24 -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 Date: Thu, 18 Oct 2018 03:35:19 +0200 Message-Id: <20181018013522.11253-5-thomas@monjalon.net> X-Mailer: git-send-email 2.19.0 In-Reply-To: <20181018013522.11253-1-thomas@monjalon.net> References: <20181007222554.4886-1-thomas@monjalon.net> <20181018013522.11253-1-thomas@monjalon.net> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Subject: [dpdk-dev] [PATCH v5 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: Thu, 18 Oct 2018 01:35:26 -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