Re: [Mesa-dev] [PATCH] u_thread: Use pthread_setname_np on linux only

2018-01-23 Thread Samuel Thibault
Jose Fonseca, on lun. 22 janv. 2018 21:12:54 +, wrote:
> Pushed.  Thanks.

Thanks!

Samuel
___
mesa-dev mailing list
mesa-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/mesa-dev


Re: [Mesa-dev] [PATCH] u_thread: Use pthread_setname_np on linux only

2018-01-23 Thread Samuel Thibault
Hello,

Jose Fonseca, on lun. 15 janv. 2018 12:29:39 +, wrote:
> On 13/01/18 11:33, Samuel Thibault wrote:
> > pthread_setname_np was added in glibc 2.12 for the Linux port only, other
> > ports do not necessarily have it.
> > ---
> >   src/util/u_thread.h | 3 ++-
> >   1 file changed, 2 insertions(+), 1 deletion(-)
> > 
> > diff --git a/src/util/u_thread.h b/src/util/u_thread.h
> > index 26cc0b093..8c6e0bdc5 100644
> > --- a/src/util/u_thread.h
> > +++ b/src/util/u_thread.h
> > @@ -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
> > 
> 
> Looks good to me.
> 
> Reviewed-by: Jose Fonseca 

Could somebody commit this?

Thanks,
Samuel
___
mesa-dev mailing list
mesa-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/mesa-dev


Re: [Mesa-dev] [PATCH] u_thread: Use pthread_setname_np on linux only

2018-01-22 Thread Jose Fonseca

On 22/01/18 21:04, Samuel Thibault wrote:

Hello,

Jose Fonseca, on lun. 15 janv. 2018 12:29:39 +, wrote:

On 13/01/18 11:33, Samuel Thibault wrote:

pthread_setname_np was added in glibc 2.12 for the Linux port only, other
ports do not necessarily have it.
---
   src/util/u_thread.h | 3 ++-
   1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/src/util/u_thread.h b/src/util/u_thread.h
index 26cc0b093..8c6e0bdc5 100644
--- a/src/util/u_thread.h
+++ b/src/util/u_thread.h
@@ -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



Looks good to me.

Reviewed-by: Jose Fonseca 


Could somebody commit this?

Thanks,
Samuel


Pushed.  Thanks.

Jose

___
mesa-dev mailing list
mesa-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/mesa-dev


Re: [Mesa-dev] [PATCH] u_thread: Use pthread_setname_np on linux only

2018-01-15 Thread Jose Fonseca

On 13/01/18 11:33, Samuel Thibault wrote:

pthread_setname_np was added in glibc 2.12 for the Linux port only, other
ports do not necessarily have it.
---
  src/util/u_thread.h | 3 ++-
  1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/src/util/u_thread.h b/src/util/u_thread.h
index 26cc0b093..8c6e0bdc5 100644
--- a/src/util/u_thread.h
+++ b/src/util/u_thread.h
@@ -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



Looks good to me.

Reviewed-by: Jose Fonseca 
___
mesa-dev mailing list
mesa-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/mesa-dev


[Mesa-dev] [PATCH] u_thread: Use pthread_setname_np on linux only

2018-01-14 Thread Samuel Thibault
pthread_setname_np was added in glibc 2.12 for the Linux port only, other
ports do not necessarily have it.
---
 src/util/u_thread.h | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/src/util/u_thread.h b/src/util/u_thread.h
index 26cc0b093..8c6e0bdc5 100644
--- a/src/util/u_thread.h
+++ b/src/util/u_thread.h
@@ -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
-- 
2.15.1

___
mesa-dev mailing list
mesa-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/mesa-dev