* cygtls.h (_local_storage::unknown_thread_name): New buffer.
* tlsoffsets.h: Regenerate. * cygthread.cc (cygthread::name): Use new thread-local buffer. * exceptions.cc (handle_exceptions): Avoid unnecessary initialization of static variables to zero. * fork.cc (slow_pid_reuse) Ditto.
This commit is contained in:
@ -210,9 +210,8 @@ cygthread::name (DWORD tid)
|
||||
|
||||
if (!res)
|
||||
{
|
||||
static char buf[30] NO_COPY = {0};
|
||||
__small_sprintf (buf, "unknown (%p)", tid);
|
||||
res = buf;
|
||||
__small_sprintf (_my_tls.locals.unknown_thread_name, "unknown (%p)", tid);
|
||||
res = _my_tls.locals.unknown_thread_name;
|
||||
}
|
||||
|
||||
return res;
|
||||
|
Reference in New Issue
Block a user