Author: bart
Date: 2008-02-28 07:36:04 +0000 (Thu, 28 Feb 2008)
New Revision: 7496

Log:
Should compile again with linuxthreads header files.

Modified:
   trunk/exp-drd/drd_intercepts.c


Modified: trunk/exp-drd/drd_intercepts.c
===================================================================
--- trunk/exp-drd/drd_intercepts.c      2008-02-28 01:36:38 UTC (rev 7495)
+++ trunk/exp-drd/drd_intercepts.c      2008-02-28 07:36:04 UTC (rev 7496)
@@ -116,7 +116,17 @@
 
 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)


-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
Valgrind-developers mailing list
Valgrind-developers@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/valgrind-developers

Reply via email to