<div dir="ltr"><div>Hi there,<br><br></div><div>I think the DPDK uses the pthread_ functions to manages its threads. You can see in `rte_eal_init` in `lib/librte_eal/linux/eal.c` that it "spawns" the threads using <br></div><div>```<br>        /* create a thread for each lcore */                                    <br>        ret = pthread_create(&lcore_config[i].thread_id, NULL,                  <br>                     eal_thread_loop, NULL);<br>```<br></div><div>So I think you should be able to use other pthread_ functions without problems from inside the EAL threads.<br></div><div>Hope that helps.<br><br></div><div>Regards,<br></div><div>Pavel.<br></div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Thu, Nov 18, 2021 at 9:24 AM Antonio Di Bacco <<a href="mailto:antonio.di-bacco@keysight.com">antonio.di-bacco@keysight.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">





<div style="overflow-wrap: break-word;" lang="EN-US">
<div class="gmail-m_-1864282280840102897WordSection1">
<p class="MsoNormal">I need to emulate the pthread_setspecific and pthread_getspecific for EAL threads. I don’t find any suitable APIs in the DPDK to access the TLS and get and set keys.<u></u><u></u></p>
<p class="MsoNormal"><u></u> <u></u></p>
<p class="MsoNormal">I launched a number of threads using the rte_eal_remote launch but I don’t find any API that allows me to access the TLS for those threads.<u></u><u></u></p>
<p class="MsoNormal"><u></u> <u></u></p>
<p class="MsoNormal"><u></u> <u></u></p>
<p class="MsoNormal"><u></u> <u></u></p>
<p class="MsoNormal"><u></u> <u></u></p>
</div>
</div>

</blockquote></div>