6 #ifndef UTILS_THREADING_H 7 #define UTILS_THREADING_H 19 #if defined _WIN32 && defined _MSC_VER 23 const DWORD MS_VC_EXCEPTION = 0x406D1388;
26 typedef struct tagTHREADNAME_INFO
39 inline void SetThreadName(DWORD dwThreadID,
const char *threadName)
43 info.szName = threadName;
44 info.dwThreadID = dwThreadID;
47 #pragma warning(disable: 6320 6322) 50 RaiseException(MS_VC_EXCEPTION, 0,
sizeof(info) /
sizeof(ULONG_PTR), (ULONG_PTR *)& info);
52 __except (EXCEPTION_EXECUTE_HANDLER)
62 inline void SetThisThreadName(
const std::string &threadName)
64 SetThreadName(GetCurrentThreadId(), threadName.c_str());
68 inline void SetThreadName(
long,
const char *)
75 inline void SetThisThreadName(
const std::string &)
81 #error "platform not supported" General namespace for utilities.
Definition: BulletConversions.h:9