[llvm-dev] LLJIT vs. thread-local storage
Jameson Nash via llvm-dev
llvm-dev at lists.llvm.org
Sat Dec 21 11:10:09 PST 2019
I think that's both true and not. Yes, it's not exposed through dyld to
reuse its TLS routines (or, for that matter, its existing linker
capabilities for in-memory objects). But I've also often seen that support
to be a thin wrapper around `pthread_key_create`, which is defined in
ISO/IEC 9945-1:1996 (``POSIX.1''). Or you can build your own emulation for
expandable TLS by putting a thread-id-counter in the original TLS, and
using that to index your own internally-managed memory regions.
On Fri, Dec 20, 2019 at 7:16 PM Joerg Sonnenberger via llvm-dev <
llvm-dev at lists.llvm.org> wrote:
> On Fri, Dec 20, 2019 at 11:47:15PM +0530, Praveen Velliengiri via llvm-dev
> wrote:
> > Hi Jameson,
> > Why thread local support is hard to support in JITs? Whether Julia
> supports
> > Thread locals? If so, it would be very much helpful to know how.
>
> TLS is normally handled somewhere between libc and dynamic linker. There
> is currently no defined interface for requested another TLS segment or
> just static TLS space.
>
> Joerg
> _______________________________________________
> LLVM Developers mailing list
> llvm-dev at lists.llvm.org
> https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20191221/a958649a/attachment.html>
More information about the llvm-dev
mailing list