CVS: winex/miscemu main.c,1.7,1.8

[email protected]
Newsgroups gmane.comp.emulators.winex.cvs
Message-ID <[email protected]>
Subject: winex/miscemu main.c,1.7,1.8Update of /var/lib/cvsd/cvsroot/winex/miscemu
In directory agravaine:/tmp/cvs-serv4701/miscemu

Modified Files:
	main.c 
Log Message:
Work around MacOS X kernel issue - avoid doing multiple calls to ldt 
setting kernel API from simultaneous threads.


Index: main.c
===================================================================
RCS file: /var/lib/cvsd/cvsroot/winex/miscemu/main.c,v
retrieving revision 1.7
retrieving revision 1.8
diff -u -d -r1.7 -r1.8
--- main.c	30 Mar 2007 18:27:30 -0000	1.7
+++ main.c	30 Mar 2007 18:33:53 -0000	1.8
@@ -19,6 +19,9 @@
 #include "wine/server.h"
 
 #ifdef __APPLE__
+#include <pthread.h>
+extern pthread_mutex_t LDT_pthread_mutex;
+
 /* define to help out debugging MacOSX libraries
 #define DEBUG_MACOSX_LIBRARIES
 */
@@ -135,6 +138,11 @@
 int main( int argc, char *argv[] )
 #endif
 {
+#ifdef __APPLE__
+    // Init the LDT pthread mutex
+    pthread_mutex_init(&LDT_pthread_mutex, NULL);
+#endif
+
     if (wine_main_preload_info)
     {
         int i;
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.