Lines 61-69
Link Here
|
61 |
static inline void u_thread_setname( const char *name ) |
61 |
static inline void u_thread_setname( const char *name ) |
62 |
{ |
62 |
{ |
63 |
#if defined(HAVE_PTHREAD) |
63 |
#if defined(HAVE_PTHREAD) |
64 |
# if defined(__GNU_LIBRARY__) && defined(__GLIBC__) && defined(__GLIBC_MINOR__) && \ |
64 |
# if defined(__linux__) && !(defined(__GLIBC__) || \ |
65 |
(__GLIBC__ >= 3 || (__GLIBC__ == 2 && __GLIBC_MINOR__ >= 12)) && \ |
65 |
(__GLIBC__ < 3 || (__GLIBC__ == 2 && __GLIBC_MINOR__ < 12))) |
66 |
defined(__linux__) |
|
|
67 |
pthread_setname_np(pthread_self(), name); |
66 |
pthread_setname_np(pthread_self(), name); |
68 |
# endif |
67 |
# endif |
69 |
#endif |
68 |
#endif |
Lines 93-100
Link Here
|
93 |
static inline bool u_thread_is_self(thrd_t thread) |
92 |
static inline bool u_thread_is_self(thrd_t thread) |
94 |
{ |
93 |
{ |
95 |
#if defined(HAVE_PTHREAD) |
94 |
#if defined(HAVE_PTHREAD) |
96 |
# if defined(__GNU_LIBRARY__) && defined(__GLIBC__) && defined(__GLIBC_MINOR__) && \ |
95 |
# if defined(__linux__) && !(defined(__GLIBC__) || \ |
97 |
(__GLIBC__ >= 3 || (__GLIBC__ == 2 && __GLIBC_MINOR__ >= 12)) |
96 |
(__GLIBC__ < 3 || (__GLIBC__ == 2 && __GLIBC_MINOR__ < 12))) |
98 |
return pthread_equal(pthread_self(), thread); |
97 |
return pthread_equal(pthread_self(), thread); |
99 |
# endif |
98 |
# endif |
100 |
#endif |
99 |
#endif |