On 2020-10-20 15:38, David Marchand wrote: > On Mon, Aug 10, 2020 at 11:37 AM Mattias Rönnblom > <mattias.ronnb...@ericsson.com> wrote: >> Introduce function in <rte_lcore.h> to retrieve a lcore worker >> thread's pthread id. >> >> This change allows applications to do things like changing the name of >> a lcore thread, or detect if it's getting interrupted (e.g. getting >> preempted by another thread). >> >> Signed-off-by: Mattias Rönnblom <mattias.ronnb...@ericsson.com> > I can see no feedback. > I am a bit reluctant at giving access to this info which is not really > abstracted across OS.. > Is there no other way to achieve what you wanted? > > The fact that POSIX threading, or at least such thread identifiers, are used internally is already visible in the lcore API.
What we are using now is a little hack with a service started on each core, which calls pthead_self(), stores the result, and turns itself off.