MCPcopy Create free account
hub / github.com/Icinga/icinga2 / WindowsSetThreadName

Function WindowsSetThreadName

lib/base/utility.cpp:1295–1308  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1293
1294#ifdef _WIN32
1295static void WindowsSetThreadName(const char *name)
1296{
1297 THREADNAME_INFO info;
1298 info.dwType = 0x1000;
1299 info.szName = name;
1300 info.dwThreadID = -1;
1301 info.dwFlags = 0;
1302
1303 __try {
1304 RaiseException(MS_VC_EXCEPTION, 0, sizeof(info) / sizeof(ULONG_PTR), (ULONG_PTR *)&info);
1305 } __except(EXCEPTION_EXECUTE_HANDLER) {
1306 /* Nothing to do here. */
1307 }
1308}
1309#endif /* _WIN32 */
1310
1311void Utility::SetThreadName(const String& name, bool os)

Callers 1

SetThreadNameMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected