Use a ./configure check to detect pthread spinlock availability

_POSIX_SPIN_LOCKS does not seem to be defined correctly on all
systems (Debian libc 2.3.6). Fixes #262.
This commit is contained in:
Martin Willi
2012-12-18 09:51:33 +01:00
parent 544c2e3d7b
commit 4185c64464
2 changed files with 9 additions and 15 deletions
+2
View File
@@ -414,6 +414,8 @@ dnl check if we can cancel threads
AC_CHECK_FUNCS(pthread_cancel)
dnl check if native rwlocks are available
AC_CHECK_FUNCS(pthread_rwlock_init)
dnl check if pthread spinlocks are available
AC_CHECK_FUNCS(pthread_spin_init)
dnl check if we have POSIX semaphore functions, including timed-wait
AC_CHECK_FUNCS(sem_timedwait)
LIBS=$saved_LIBS