Am Fri, 14 Jul 2017 12:47:55 +0000 schrieb Kagamin <s...@here.lot>: > Just allocate emutls array in managed heap and pin it somewhere, > then everything referenced by it will be preserved.
This is basically the option of replicating GCC-style emutls in druntime. This is quite simple to implement and you don't even need special pinning, as the Thread instance object in core.thread can refer to the TLS array. This solution can't be implemented in libgcc though, as obviously the GC is not always available to allocate the arrays in pure C programs ;-) -- Johannes