[LLVMbugs] [Bug 6297] New: RWMutex.cpp and pthread on mingw
bugzilla-daemon at cs.uiuc.edu
bugzilla-daemon at cs.uiuc.edu
Sun Feb 14 06:04:11 PST 2010
http://llvm.org/bugs/show_bug.cgi?id=6297
Summary: RWMutex.cpp and pthread on mingw
Product: libraries
Version: trunk
Platform: PC
OS/Version: Windows NT
Status: NEW
Severity: major
Priority: P2
Component: Core LLVM classes
AssignedTo: unassignedbugs at nondot.org
ReportedBy: forumer at smartmobili.com
CC: llvmbugs at cs.uiuc.edu
Hi,
on mingw platform RWMUtex.cpp asserts L87 due to the fact pthread doesnt'
support passing a non zero value to pthread_rwlock_init.
Here is a fix(tested):
$ svn diff RWMutex.cpp
Index: RWMutex.cpp
===================================================================
--- RWMutex.cpp (revision 96005)
+++ RWMutex.cpp (working copy)
@@ -83,7 +83,11 @@
#endif
// Initialize the rwlock
+#ifdef __MINGW32__
+ errorcode = pthread_rwlock_init(rwlock, 0);
+#else
errorcode = pthread_rwlock_init(rwlock, &attr);
+#endif
assert(errorcode == 0);
// Destroy the attributes
--
Configure bugmail: http://llvm.org/bugs/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.
More information about the llvm-bugs
mailing list