Native threads
authorstefan <none@none>
Sat, 13 Dec 2003 18:19:19 +0000 (18:19 +0000)
committerstefan <none@none>
Sat, 13 Dec 2003 18:19:19 +0000 (18:19 +0000)
global.h
src/threads/green/threads.c
src/vm/global.h
threads/thread.c

index ad56924e69a0f7fbd87b9ed9ef13eef6fc49c163..d223eb779c5c5cf11edce92aeab133dfaeb9586a 100644 (file)
--- a/global.h
+++ b/global.h
@@ -31,7 +31,7 @@
             Philipp Tomsich
                        Edwin Steiner
 
-   $Id: global.h 727 2003-12-11 10:52:40Z edwin $
+   $Id: global.h 737 2003-12-13 18:19:19Z stefan $
 
 */
 
 #include "types.h"
 #include "toolbox/list.h"
 
+#if defined(USE_THREADS) && defined(NATIVE_THREADS)
+#include <pthread.h>
+#endif
+
 
 #define _GNU_SOURCE
 
@@ -850,6 +854,12 @@ extern primitivetypeinfo primitivetype_table[PRIMITIVETYPE_COUNT];
                                if ((utf_ptr)[-1] != ';')                                                               \
                                        (errorflag) = true; }} while(0)
 
+
+/* Synchronization ************************************************************/
+
+extern pthread_mutex_t cast_mutex;
+extern pthread_mutex_t compiler_mutex;
+
 #endif /* _GLOBAL_H */
 
 
index fc9815e22ad2fbc7fd064490f138b1ad23a08802..4d39c5de53425faf484f9fa1364b2f1069bf190f 100644 (file)
 #include "toolbox/loging.h"
 #include "toolbox/memory.h"
 
+#if defined(NATIVE_THREADS)
+pthread_mutex_t cast_mutex = PTHREAD_MUTEX_INITIALIZER;
+pthread_mutex_t compiler_mutex = PTHREAD_MUTEX_INITIALIZER;
+#endif
 
 static classinfo *class_java_lang_ThreadDeath;
 
index ad56924e69a0f7fbd87b9ed9ef13eef6fc49c163..d223eb779c5c5cf11edce92aeab133dfaeb9586a 100644 (file)
@@ -31,7 +31,7 @@
             Philipp Tomsich
                        Edwin Steiner
 
-   $Id: global.h 727 2003-12-11 10:52:40Z edwin $
+   $Id: global.h 737 2003-12-13 18:19:19Z stefan $
 
 */
 
 #include "types.h"
 #include "toolbox/list.h"
 
+#if defined(USE_THREADS) && defined(NATIVE_THREADS)
+#include <pthread.h>
+#endif
+
 
 #define _GNU_SOURCE
 
@@ -850,6 +854,12 @@ extern primitivetypeinfo primitivetype_table[PRIMITIVETYPE_COUNT];
                                if ((utf_ptr)[-1] != ';')                                                               \
                                        (errorflag) = true; }} while(0)
 
+
+/* Synchronization ************************************************************/
+
+extern pthread_mutex_t cast_mutex;
+extern pthread_mutex_t compiler_mutex;
+
 #endif /* _GLOBAL_H */
 
 
index fc9815e22ad2fbc7fd064490f138b1ad23a08802..4d39c5de53425faf484f9fa1364b2f1069bf190f 100644 (file)
 #include "toolbox/loging.h"
 #include "toolbox/memory.h"
 
+#if defined(NATIVE_THREADS)
+pthread_mutex_t cast_mutex = PTHREAD_MUTEX_INITIALIZER;
+pthread_mutex_t compiler_mutex = PTHREAD_MUTEX_INITIALIZER;
+#endif
 
 static classinfo *class_java_lang_ThreadDeath;