mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-05 16:08:04 +02:00
u_thread: Use pthread_setname_np on linux only.
pthread_setname_np was added in glibc 2.12 for the Linux port only, other ports do not necessarily have it. Signed-off-by: Jose Fonseca <jfonseca@vmware.com>
This commit is contained in:
parent
dcbb224c68
commit
9131e6d3c2
1 changed files with 2 additions and 1 deletions
|
|
@ -62,7 +62,8 @@ static inline void u_thread_setname( const char *name )
|
|||
{
|
||||
#if defined(HAVE_PTHREAD)
|
||||
# if defined(__GNU_LIBRARY__) && defined(__GLIBC__) && defined(__GLIBC_MINOR__) && \
|
||||
(__GLIBC__ >= 3 || (__GLIBC__ == 2 && __GLIBC_MINOR__ >= 12))
|
||||
(__GLIBC__ >= 3 || (__GLIBC__ == 2 && __GLIBC_MINOR__ >= 12)) && \
|
||||
defined(__linux__)
|
||||
pthread_setname_np(pthread_self(), name);
|
||||
# endif
|
||||
#endif
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue