On Thu, 5 Dec 2024, LIU Hao wrote:
在 2024-12-05 20:38, Martin Storsjö 写道:
When the libstdc++/libsupc++ implementation of __cxa_thread_atexit is
used in conjunction with emulated TLS, both emutls and libsupc++
register destructors to be executed via pthread_key_create; one for
freeing the per-th
The following seems to only not work in GCC (neither MinGW nor native
GCC), but it compiles fine in MSVC.
```
template
struct A
{
int numElements;
T* elements;
};
template
class B : public A
{
B(int newNumElements)
{
numElements = newNumElements; // This fails with error.
On Thu, 5 Dec 2024, Martin Storsjö wrote:
> When the destructors of the TLS objects are executed via
> mingw-w64-crt's __cxa_thread_atexit, those destructors are executed
> via a TLS callback, after the point when emutls has deallocated
> their storage memory.
> Unfortunately, this isn't enough t
From fe5b01498031e3ba2c7cecef627671c1ba5c0007 Mon Sep 17 00:00:00 2001
From: Biswapriyo Nath
Date: Thu, 5 Dec 2024 17:38:42 +
Subject: [PATCH] headers: Add new symbols in processthreadsapi.h
Signed-off-by: Biswapriyo Nath
---
mingw-w64-headers/include/processthreadsapi.h | 14 +++--
在 2024-12-05 20:38, Martin Storsjö 写道:
When the libstdc++/libsupc++ implementation of __cxa_thread_atexit is
used in conjunction with emulated TLS, both emutls and libsupc++
register destructors to be executed via pthread_key_create; one for
freeing the per-thread memory allocated for the TLS obj
> On 5. Dec 2024, at 14.38, Martin Storsjö wrote:
>
> Within winpthreads, a native posix thread is a thread that has
> been created via pthread_create.
>
> Previously, pthread key destructors were executed immediately when
> the thread exits, for native posix threads. For non-posix native
> thre
According to docs, the order is unspecified, but running them in
reverse order would be more logical.
When libstdc++ is built, it can either provide its own implementation
of __cxa_thread_atexit or use one from the host environment.
When libstdc++ is cross compiled, the configure script doesn't d
Within winpthreads, a native posix thread is a thread that has
been created via pthread_create.
Previously, pthread key destructors were executed immediately when
the thread exits, for native posix threads. For non-posix native
threads (i.e. threads created via some other API than pthreads),
the p