build: remove --enable-threadlocal

This commit is contained in:
fanquake
2024-05-18 10:59:55 +08:00
parent 1e7c20bc19
commit 17fe948cce
4 changed files with 1 additions and 59 deletions

View File

@@ -37,10 +37,6 @@ static void SetThreadName(const char* name)
#endif
}
// If we have thread_local, just keep thread ID and name in a thread_local
// global.
#if defined(HAVE_THREAD_LOCAL)
/**
* The name of the thread. We use char array instead of std::string to avoid
* complications with running a destructor when the thread exits. Avoid adding
@@ -58,13 +54,6 @@ static void SetInternalName(const std::string& name)
g_thread_name[copy_bytes] = '\0';
}
// Without thread_local available, don't handle internal name at all.
#else
std::string util::ThreadGetInternalName() { return ""; }
static void SetInternalName(const std::string& name) { }
#endif
void util::ThreadRename(const std::string& name)
{
SetThreadName(("b-" + name).c_str());