From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from dpdk.org (dpdk.org [92.243.14.124]) by inbox.dpdk.org (Postfix) with ESMTP id CAC0BA0093; Mon, 18 May 2020 19:49:02 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 678AD1D427; Mon, 18 May 2020 19:49:02 +0200 (CEST) Received: from mail-lf1-f67.google.com (mail-lf1-f67.google.com [209.85.167.67]) by dpdk.org (Postfix) with ESMTP id 1BC1D1C2B2 for ; Mon, 18 May 2020 19:49:01 +0200 (CEST) Received: by mail-lf1-f67.google.com with SMTP id w15so1495756lfe.11 for ; Mon, 18 May 2020 10:49:01 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=date:from:to:cc:subject:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=pBBxqAoaxk0VMDgUCtAr81xRcI4ZTdp/zLGS3QGIzps=; b=HO89rSSkv0CvVsiXMxZEbbwN4OJnyJd1cFGdmF0V5TP/8HlbQUW7M2GMTRLxd48/A/ 1I6Qs4h0wc5GepG3SWsjw3n+eYcIDYhftbuO4xOc32kiILaWfD4ErNv7y/6BUxIPvdYs rQdRzjTWl1lV2VUu1TD5DmlqVpig5LsAin+fBvGFBFEyo9GeagsRBnHnY20FjpOWLGe8 8ooIdmtmQ9F61Q9TcC/4D4HCoJuZr0dTvofAp7dGdjd8gykV/XeYjiozrTY0gILXLtSg UD9fHjdy2LjmDNMP6XE9UrSZLCCvt99551Ipn+7ffGyEH0k0K3GgxMbXRl42RpIbUKVH AFqg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=pBBxqAoaxk0VMDgUCtAr81xRcI4ZTdp/zLGS3QGIzps=; b=hvoqdz84SV4E7aCFl3lFazEUc/RpK4tiN/T7LhKaPhJ8Yak4/srg4vz5DQfn2XvkEJ s/t1g72cB3SIDFGczk7a4v95hpQjM1S/bW3HzOLEicOXNwWqkvAKzDf1Bzq6F3JRRU8t AwYWwVkQSpJyi4hnZB+F5V9gRY11o8g9JwpZysLW1ALaEgNc9nN1795SuxHfDfoit25Q MszgOmvufjHd4LAef2WDRzTMKQCMdotVOf99dmaIM6B2ZhLuqBtjpCqKW573XY2f15TL +ch5/1M91BWb7Lm6SjTQKY06m8TU8D360z8VmQTImfvODRsKL9IiF10Ngf9/JU4DLeP3 LgHw== X-Gm-Message-State: AOAM531yOzkihgxFD8TswEBp155lb6M/fUju0gfhS322x3kTgsqZWHv8 f5AgiyI7nYeyVs53OfYnIfI= X-Google-Smtp-Source: ABdhPJxvtA1SAUWcMBB6coMR7KrKFO5ua/1B8X1cAXgpUxxfhbTJZhR8U6Y+j+muL/rNuaUpPP4E4g== X-Received: by 2002:ac2:4c2d:: with SMTP id u13mr12013674lfq.197.1589824140632; Mon, 18 May 2020 10:49:00 -0700 (PDT) Received: from sovereign (broadband-37-110-65-23.ip.moscow.rt.ru. [37.110.65.23]) by smtp.gmail.com with ESMTPSA id f74sm7453675lfd.68.2020.05.18.10.48.59 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 18 May 2020 10:48:59 -0700 (PDT) Date: Mon, 18 May 2020 20:48:59 +0300 From: Dmitry Kozlyuk To: Tasnim Bashar Cc: dev@dpdk.org, harini.ramakrishnan@microsoft.com, pallavi.kadam@intel.com, ranjit.menon@intel.com, ocardona@microsoft.com, navasile@linux.microsoft.com, talshn@mellanox.com, fady@mellanox.com, ophirmu@mellanox.com, thomas@monjalon.net Message-ID: <20200518204859.3d66a5f2@sovereign> In-Reply-To: <20200518142634.17760-1-tbashar@mellanox.com> References: <20200518142634.17760-1-tbashar@mellanox.com> X-Mailer: Claws Mail 3.17.4 (GTK+ 2.24.32; x86_64-pc-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Subject: Re: [dpdk-dev] [PATCH] eal/windows: support thread ID query 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: , Errors-To: dev-bounces@dpdk.org Sender: "dev" On Mon, 18 May 2020 17:26:34 +0300 Tasnim Bashar wrote: > Add rte_sys_gettid function to use rte_gettid() on Windows. > rte_gettid() is required for recursive spin lock and recursive ticket > lock. > > Signed-off-by: Tasnim Bashar > --- > lib/librte_eal/windows/eal_thread.c | 6 ++++++ > 1 file changed, 6 insertions(+) > > diff --git a/lib/librte_eal/windows/eal_thread.c > b/lib/librte_eal/windows/eal_thread.c index e149199a6f..18f03c4280 > 100644 --- a/lib/librte_eal/windows/eal_thread.c > +++ b/lib/librte_eal/windows/eal_thread.c > @@ -157,6 +157,12 @@ eal_thread_create(pthread_t *thread) > return 0; > } > > +/* get current thread ID */ > +int rte_sys_gettid(void) Please follow the style guide and place return type on a separate line. You can use ./devtools/checkpatches.sh to catch similar mistakes. > +{ > + return (int)eal_thread_self(); Maybe get rid of eal_thread_self() in this file and replace its call with rte_sys_gettid()? > +} > + > int > rte_thread_setname(__rte_unused pthread_t id, __rte_unused const > char *name) { -- Dmitry Kozlyuk