* [dpdk-dev] [PATCH v2] eal/windows: support thread ID query [not found] <20200518142634> @ 2020-05-21 0:32 ` Tasnim Bashar 2020-05-25 1:08 ` Dmitry Kozlyuk 0 siblings, 1 reply; 3+ messages in thread From: Tasnim Bashar @ 2020-05-21 0:32 UTC (permalink / raw) To: dev Cc: harini.ramakrishnan, pallavi.kadam, ranjit.menon, ocardona, navasile, dmitry.kozliuk, talshn, fady, ophirmu, thomas 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> --- v2: remove eal_thread_self function and fix style --- lib/librte_eal/windows/eal_thread.c | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/lib/librte_eal/windows/eal_thread.c b/lib/librte_eal/windows/eal_thread.c index e149199a6f..4c1e31c58a 100644 --- a/lib/librte_eal/windows/eal_thread.c +++ b/lib/librte_eal/windows/eal_thread.c @@ -64,12 +64,6 @@ eal_thread_init_master(unsigned int lcore_id) RTE_PER_LCORE(_lcore_id) = lcore_id; } -static inline pthread_t -eal_thread_self(void) -{ - return GetCurrentThreadId(); -} - /* main loop of threads */ void * eal_thread_loop(void *arg __rte_unused) @@ -81,7 +75,7 @@ eal_thread_loop(void *arg __rte_unused) int m2s, s2m; char cpuset[RTE_CPU_AFFINITY_STR_LEN]; - thread_id = eal_thread_self(); + thread_id = pthread_self(); /* retrieve our lcore_id from the configuration structure */ RTE_LCORE_FOREACH_SLAVE(lcore_id) { @@ -157,6 +151,13 @@ eal_thread_create(pthread_t *thread) return 0; } +/* get current thread ID */ +int +rte_sys_gettid(void) +{ + return GetCurrentThreadId(); +} + int rte_thread_setname(__rte_unused pthread_t id, __rte_unused const char *name) { -- 2.19.1.windows.1 ^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [dpdk-dev] [PATCH v2] eal/windows: support thread ID query 2020-05-21 0:32 ` [dpdk-dev] [PATCH v2] eal/windows: support thread ID query Tasnim Bashar @ 2020-05-25 1:08 ` Dmitry Kozlyuk 2020-06-11 14:41 ` Thomas Monjalon 0 siblings, 1 reply; 3+ messages in thread From: Dmitry Kozlyuk @ 2020-05-25 1:08 UTC (permalink / raw) To: Tasnim Bashar Cc: dev, harini.ramakrishnan, pallavi.kadam, ranjit.menon, ocardona, navasile, talshn, fady, ophirmu, thomas On Wed, 20 May 2020 17:32:53 -0700 Tasnim Bashar <tbashar@mellanox.com> 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 <tbashar@mellanox.com> > --- > > v2: remove eal_thread_self function and fix style > > --- > lib/librte_eal/windows/eal_thread.c | 15 ++++++++------- > 1 file changed, 8 insertions(+), 7 deletions(-) > [snip] Acked-by: Dmitry Kozlyuk <dmitry.kozliuk@gmail.com> -- Dmitry Kozlyuk ^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [dpdk-dev] [PATCH v2] eal/windows: support thread ID query 2020-05-25 1:08 ` Dmitry Kozlyuk @ 2020-06-11 14:41 ` Thomas Monjalon 0 siblings, 0 replies; 3+ messages in thread From: Thomas Monjalon @ 2020-06-11 14:41 UTC (permalink / raw) To: Tasnim Bashar Cc: dev, harini.ramakrishnan, pallavi.kadam, ranjit.menon, ocardona, navasile, talshn, fady, ophirmu, Dmitry Kozlyuk 25/05/2020 03:08, Dmitry Kozlyuk: > On Wed, 20 May 2020 17:32:53 -0700 > Tasnim Bashar <tbashar@mellanox.com> 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 <tbashar@mellanox.com> > > Acked-by: Dmitry Kozlyuk <dmitry.kozliuk@gmail.com> Applied, thanks ^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2020-06-11 14:41 UTC | newest] Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed) -- links below jump to the message on this page -- [not found] <20200518142634> 2020-05-21 0:32 ` [dpdk-dev] [PATCH v2] eal/windows: support thread ID query Tasnim Bashar 2020-05-25 1:08 ` Dmitry Kozlyuk 2020-06-11 14:41 ` Thomas Monjalon
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).