summaryrefslogtreecommitdiff
path: root/lib/glthread
diff options
context:
space:
mode:
authorClint Adams <clint@debian.org>2018-12-22 09:23:19 -0500
committerClint Adams <clint@debian.org>2018-12-22 09:23:19 -0500
commit637a2e292881341dde845545517b0ed3d3ccfc94 (patch)
treec0d05d9f8978af415c5cea9ec39fc85b6bfb6cec /lib/glthread
parent117dcd10d7e04d0dda7668518b8d085027f4d705 (diff)
New upstream version 4.7
Diffstat (limited to 'lib/glthread')
-rw-r--r--lib/glthread/lock.h20
1 files changed, 8 insertions, 12 deletions
diff --git a/lib/glthread/lock.h b/lib/glthread/lock.h
index fcc3f3a..30aa730 100644
--- a/lib/glthread/lock.h
+++ b/lib/glthread/lock.h
@@ -149,18 +149,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