test pthread_spin_lock
authorGengbin Zheng <gzheng@illinois.edu>
Tue, 27 Mar 2012 17:47:28 +0000 (12:47 -0500)
committerGengbin Zheng <gzheng@illinois.edu>
Tue, 27 Mar 2012 17:47:28 +0000 (12:47 -0500)
src/scripts/configure.in

index 51c1b6850242b71386e1ae341c2f7e3865731d18..3bb69d5cc36b80de0afa615db591950ea0a1ba8d 100644 (file)
@@ -1236,6 +1236,26 @@ EOT
 test_linkc "whether pthread_setaffinity_np call exists" "yes" "no" "-lpthread"
 AC_DEFINE_UNQUOTED(CMK_HAS_PTHREAD_SETAFFINITY, $pass, [whether the pthread_setaffinity_np() exists])
 
+### test pthread_spin_lock ####
+cat > $tc <<EOT
+#include <stdlib.h>
+#include <stdio.h>
+#include <unistd.h>
+#include <pthread.h>
+
+int main()
+{
+  pthread_spinlock_t  lock;
+
+  pthread_spin_init(&lock, 0);
+
+  pthread_spin_lock(&lock);
+
+  return 0;
+}
+EOT
+test_linkc "whether pthread_spin_lock exists" "yes" "no" "-lpthread"
+AC_DEFINE_UNQUOTED(CMK_HAS_SPINLOCK, $pass, [whether the pthread_spin_lock exists])
 
 ### check libnuma on Linux ####
 if test "$WITH_NUMA" = "yes"