]> git.ipfire.org Git - thirdparty/valgrind.git/commitdiff
Should compile again with linuxthreads header files.
authorBart Van Assche <bvanassche@acm.org>
Thu, 28 Feb 2008 07:36:04 +0000 (07:36 +0000)
committerBart Van Assche <bvanassche@acm.org>
Thu, 28 Feb 2008 07:36:04 +0000 (07:36 +0000)
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@7496

exp-drd/drd_intercepts.c

index bc0f3c763e310d6a2aa773dc85e39114fc122f7c..5ed7a5bc8529698f0637f84d1b6af66b7d6bdcf7 100644 (file)
@@ -116,7 +116,17 @@ static MutexT pthread_to_drd_mutex_type(const int kind)
 
 static MutexT mutex_type(pthread_mutex_t* mutex)
 {
-   return pthread_to_drd_mutex_type(mutex->__data.__kind);
+#if defined(_PTHREAD_DESCR_DEFINED)
+   // Linuxthreads.
+   const int kind = mutex->__m_kind;
+#elif defined(__SIZEOF_PTHREAD_MUTEX_T)
+   // NPTL.
+   const int kind = mutex->__data.__kind;
+#else
+   // Another POSIX threads implementation. Regression tests will fail.
+   const int kind = PTHREAD_MUTEX_DEFAULT;
+#endif
+   return pthread_to_drd_mutex_type(kind);
 }
 
 static void vg_start_suppression(const void* const p, size_t const size)