From 7b65dbd4ebade81d504cfe5e681292a58ad1fdf0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=B6rg=20Frings-F=C3=BCrst?= Date: Thu, 28 Jun 2018 04:18:55 +0200 Subject: New upstream version 0.9.10 --- lib/glthread/lock.h | 20 ++++++++------------ 1 file changed, 8 insertions(+), 12 deletions(-) (limited to 'lib/glthread/lock.h') diff --git a/lib/glthread/lock.h b/lib/glthread/lock.h index ffb2b0e5..2d8d5abb 100644 --- a/lib/glthread/lock.h +++ b/lib/glthread/lock.h @@ -158,18 +158,14 @@ extern int glthread_in_use (void); # endif # if !PTHREAD_IN_USE_DETECTION_HARD - /* On most platforms, pthread_cancel or pthread_kill can be used to - determine whether libpthread is in use. - On newer versions of FreeBSD, however, this is no longer possible, - because pthread_cancel and pthread_kill got added to libc. Therefore - use pthread_create to test whether libpthread is in use. */ -# if defined __FreeBSD__ || defined __DragonFly__ /* FreeBSD */ -# pragma weak pthread_create -# define pthread_in_use() (pthread_create != NULL) -# else /* glibc, NetBSD, OpenBSD, IRIX, OSF/1, Solaris */ -# pragma weak pthread_cancel -# define pthread_in_use() (pthread_cancel != NULL) -# endif + /* Considering all platforms with USE_POSIX_THREADS_WEAK, only few symbols + can be used to determine whether libpthread is in use. These are: + pthread_mutexattr_gettype + pthread_rwlockattr_destroy + pthread_rwlockattr_init + */ +# pragma weak pthread_mutexattr_gettype +# define pthread_in_use() (pthread_mutexattr_gettype != NULL) # endif # else -- cgit v1.2.3