On Tue, 08 Dec 2020 08:47:15 +0100, Thomas Monjalon wrote: > 08/12/2020 08:03, Narcisa Ana Maria Vasile: [...] > > However, there are a few issues to consider: > > * We cannot add __declspec(dllimport) when declaring per_lcore__lcore_id > > for example. We cannot have both __thread and __declspec(dllimport) (can't > > import thread local variables). > > We cannot export a TLS variable? It looks to be a serious issue. > > > > Have you discussed/run into these issues before? Let me know what you > > think. > > Curiously it has never been discussed in 2 years of DPDK porting to Windows. > Thanks for raising.
Oh, it has been discussed. I've even made a demo about TLS variables in DLLs with GCC, which supports them, albeit with a penalty, and Clang, which doesn't support them. At the time, we agreed that having static linking would be enough as a first step, now we're past it.