1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33
|
Author: Pino Toscano <pino@debian.org>
Description: fix (workaround) build on GNU/Hurd
Apparently PTHREAD_MUTEX_NORMAL and PTHREAD_MUTEX_DEFAULT cannot be used
in preprocessor expressions, so temporarly use directly the code which would
be used on GNU/Hurd.
Origin: vendor
Forwarded: not-needed
Last-Update: 2011-12-30
---
Source/JavaScriptCore/wtf/FastMalloc.cpp | 4 ++++
1 file changed, 4 insertions(+)
--- a/Source/WTF/wtf/FastMalloc.cpp
+++ b/Source/WTF/wtf/FastMalloc.cpp
@@ -1966,6 +1966,9 @@ ALWAYS_INLINE void TCMalloc_PageHeap::su
void TCMalloc_PageHeap::initializeScavenger()
{
// Create a non-recursive mutex.
+#if defined(__GNU__)
+ pthread_mutex_init(&m_scavengeMutex, 0);
+#else
#if !defined(PTHREAD_MUTEX_NORMAL) || PTHREAD_MUTEX_NORMAL == PTHREAD_MUTEX_DEFAULT
pthread_mutex_init(&m_scavengeMutex, 0);
#else
@@ -1977,6 +1980,7 @@ void TCMalloc_PageHeap::initializeScaven
pthread_mutexattr_destroy(&attr);
#endif
+#endif
pthread_cond_init(&m_scavengeCondition, 0);
m_scavengeThreadActive = true;
|