From: Tasnim Bashar <tbashar@mellanox.com>
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
Subject: [dpdk-dev] [PATCH] eal/windows: support thread ID query
Date: Mon, 18 May 2020 17:26:34 +0300 [thread overview]
Message-ID: <20200518142634.17760-1-tbashar@mellanox.com> (raw)
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 <tbashar@mellanox.com>
---
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
next reply other threads:[~2020-05-18 14:47 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-05-18 14:26 Tasnim Bashar [this message]
2020-05-18 17:48 ` Dmitry Kozlyuk
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20200518142634.17760-1-tbashar@mellanox.com \
--to=tbashar@mellanox.com \
--cc=dev@dpdk.org \
--cc=dmitry.kozliuk@gmail.com \
--cc=fady@mellanox.com \
--cc=harini.ramakrishnan@microsoft.com \
--cc=navasile@linux.microsoft.com \
--cc=ocardona@microsoft.com \
--cc=ophirmu@mellanox.com \
--cc=pallavi.kadam@intel.com \
--cc=ranjit.menon@intel.com \
--cc=talshn@mellanox.com \
--cc=thomas@monjalon.net \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).