This is the mail archive of the libc-alpha@sourceware.org mailing list for the glibc project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [PATCH] Destructor support for C++11 thread_local variables


On 10/11/2012 07:13 PM, Roland McGrath wrote:
Then why do we have __attribute__ ((destructor)) when there is already
atexit?

Because there is no run-time penalty for that, whereas there is a run-time penalty for thread_local variables to support dynamic init/destruction even for variables that don't actually need it.


But it's IMHO
inexcusable that a patch to implement this deep in the bowels of glibc
after the C++ standard and the G++ implementation have already been baked
is the first we are hearing about the subject.

I think you overestimate how baked they are. :)


My initial implementation, which is the first implementation of this language feature, just went into the compiler and is still somewhat in flux. If there are problems with the specification, they can be fixed in a DR. Jakub suggested that we could get better semantics through glibc integration, so we're trying to do that.

Jason


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]