On Wed, 28 Oct 2020, Jeremy Drake via Mingw-w64-public wrote:

On Wed, 28 Oct 2020, Martin Storsjö wrote:

Don't run the destructors directly after executing the user thread
function. This allows running other TLS callbacks (e.g. tls_atexit.c)
before running destructors registered via pthread_key_create (which
can be used by the libgcc emutls allocations, if libgcc is built with
the pthread thread model).

So then my patch is no longer necessary, because the __thread tls_dtors
will still be valid?  +1

I think your patch still is good to have, in any case. As long as __thread is implemented with native TLS, the current code is pretty neat, but with emutls, it's pretty messy, so I think your patch simplifies the design in general.

// Martin

_______________________________________________
Mingw-w64-public mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/mingw-w64-public

Reply via email to