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 32F251B533 for ; Tue, 9 Oct 2018 15:35:01 +0200 (CEST) Received: from compute1.internal (compute1.nyi.internal [10.202.2.41]) by mailout.nyi.internal (Postfix) with ESMTP id CE34F22025; Tue, 9 Oct 2018 09:35:00 -0400 (EDT) Received: from mailfrontend2 ([10.202.2.163]) by compute1.internal (MEProxy); Tue, 09 Oct 2018 09:35:00 -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=ejzDCHOTbpH00rpozPG0n+nQHD XvTy7ncHN1JTcS1OU5AOAqghWx/EVhB9E4zkGBHFwBUbH1XfNLakgH/zI+gNEJGB 0Fp69kO0klYiXYGPtzEYxGmzOLDVuK7v+cSS22uvV2jU1uWVD3Gk4em+LAQzJTrh +XAxWEguTqO1IJ8rE= 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=K2cjiGzp adZaoa4Ny6k+ekBLqdP2X9OeljxsO0rkHrqsBV7mkYnqXC6L6JFsV/8sqNAQhT/o Fakwe1kLBNLd9kQKII/JbqtYmAFXCf0k2xUsNrZlMt4ChxOgKC/tfzp457nknfRU lQ9NbrxeO8rJQ9ktScjCqMIiG8Nl1W45KXCX3bkRNmjfHs1Qg2QfhWdSDS6E94Zn pwsxnhpgjo/NA6X/Mcejb8ATXfmoB0f7qRtW4d47z+5AT8XDM/6KIywo7HnCAGpP BYl6rXK3JGSevI00Bk7JT2JponUmIrsuiyeuM/Cx8UqgUgp6n7/KxATasXSPNzcg VRf8h5/pCJC3VA== 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 AFDBC102D7; Tue, 9 Oct 2018 09:34:59 -0400 (EDT) From: Thomas Monjalon To: dev@dpdk.org Cc: gaetan.rivet@6wind.com, ophirmu@mellanox.com, ferruh.yigit@intel.com, arybchenko@solarflare.com Date: Tue, 9 Oct 2018 15:34:48 +0200 Message-Id: <20181009133450.19112-5-thomas@monjalon.net> X-Mailer: git-send-email 2.19.0 In-Reply-To: <20181009133450.19112-1-thomas@monjalon.net> References: <20181007222554.4886-1-thomas@monjalon.net> <20181009133450.19112-1-thomas@monjalon.net> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Subject: [dpdk-dev] [PATCH v3 4/6] 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: Tue, 09 Oct 2018 13:35:01 -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