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 EFEC7A0093; Mon, 18 May 2020 16:47:49 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 1A1F51D17C; Mon, 18 May 2020 16:47:42 +0200 (CEST) Received: from mellanox.co.il (mail-il-dmz.mellanox.com [193.47.165.129]) by dpdk.org (Postfix) with ESMTP id AD7091BF84 for ; Mon, 18 May 2020 16:27:06 +0200 (CEST) Received: from Internal Mail-Server by MTLPINE1 (envelope-from tbashar@mellanox.com) with ESMTPS (AES256-SHA encrypted); 18 May 2020 17:27:05 +0300 Received: from l-wincomp04-vm.labs.mlnx (l-wincomp04-vm.mtl.labs.mlnx [10.237.1.5]) by labmailer.mlnx (8.13.8/8.13.8) with ESMTP id 04IER5iq003672; Mon, 18 May 2020 17:27:05 +0300 From: Tasnim Bashar To: dev@dpdk.org Cc: harini.ramakrishnan@microsoft.com, pallavi.kadam@intel.com, ranjit.menon@intel.com, ocardona@microsoft.com, navasile@linux.microsoft.com, dmitry.kozliuk@gmail.com, talshn@mellanox.com, fady@mellanox.com, ophirmu@mellanox.com, thomas@monjalon.net, tbashar@mellanox.com Date: Mon, 18 May 2020 17:26:34 +0300 Message-Id: <20200518142634.17760-1-tbashar@mellanox.com> X-Mailer: git-send-email 2.16.1.windows.4 X-Mailman-Approved-At: Mon, 18 May 2020 16:47:39 +0200 Subject: [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" 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) +{ + return (int)eal_thread_self(); +} + int rte_thread_setname(__rte_unused pthread_t id, __rte_unused const char *name) { -- 2.16.1.windows.4