Merged revisions 7797-7917 via svnmerge from
[cacao.git] / src / vm / jit / optimizing / recompile.c
index fe596c1d84d9a02b872917766af1501927fa24a8..bca3ef36cf733474b14c786702962ae98763bda2 100644 (file)
 
 #include "mm/memory.h"
 
-#if defined(ENABLE_THREADS)
-# include "threads/threads-common.h"
-
-# include "threads/native/lock.h"
-# include "threads/native/threads.h"
-#endif
+#include "threads/lock-common.h"
+#include "threads/threads-common.h"
 
 #include "toolbox/list.h"
 
@@ -59,7 +55,6 @@
 
 /* global variables ***********************************************************/
 
-static threadobject      *thread_recompile;
 static java_objectheader *lock_thread_recompile;
 static list_t            *list_recompile_methods;
 
@@ -221,15 +216,9 @@ bool recompile_start_thread(void)
 
        name = utf_new_char("Recompiler");
 
-       thread_recompile = threads_create_thread(name);
-
-       if (thread_recompile == NULL)
+       if (!threads_thread_start_internal(name, recompile_thread))
                return false;
 
-       /* actually start the recompilation thread */
-
-       threads_start_thread(thread_recompile, recompile_thread);
-
        /* everything's ok */
 
        return true;