/src/

>- new_time_ms); } } #if defined(linux) || defined(__linux) #include <sys/prctl.h> inline void setThreadName(const char *name) { /* It would be cleaner to do this with pthread_setname_np, * which was added to glibc in version 2.12, but some major * distributions are still runing 2.11 and previous versions. */ prctl(PR_SET_NAME, name); } #elif defined(__FreeBSD__) || defined(__OpenBSD__) #include <pthread.h> #include <pthread_np.h> inline void setThreadName(const char *name) { pthread_set_name_np(pthread_self(), name); } #elif defined(__NetBSD__) #include <pthread.h> inline void setThreadName(const char *name) { pthread_setname_np(pthread_self(), name); } #elif defined(_MSC_VER) typedef struct tagTHREADNAME_INFO { DWORD dwType; // must be 0x1000 LPCSTR szName; // pointer to name (in user addr space) DWORD dwThreadID; // thread ID (-1=caller thread)