* src/vm/jit/disass.h [!ENABLE_DISASSEMBLER]: Fixed compilation.
[cacao.git] / src / threads / threadlist.c
index 8b7d92e3e84764a2c33581a44d87139beeccad09..b585f22c54f2c6177241f086c72fcb610cfd18f0 100644 (file)
 
 #include "mm/memory.h"
 
-#include "threads/mutex.h"
+#include "threads/mutex.hpp"
 #include "threads/threadlist.h"
-#include "threads/thread.h"
+#include "threads/thread.hpp"
 
 #include "toolbox/list.h"
 
-#include "vmcore/options.h"
+#include "vm/options.h"
 
 
 /* global variables ***********************************************************/
 
-static mutex_t threadlist_mutex;          /* global mutex for the thread list */
+static Mutex* threadlist_mutex;           /* global mutex for the thread list */
 
 static list_t *list_thread;                            /* global threads list */
 static list_t *list_thread_free;                  /* global free threads list */
@@ -65,7 +65,7 @@ void threadlist_init(void)
 
        /* Initialize the thread list mutex. */
 
-       mutex_init(&threadlist_mutex);
+       threadlist_mutex = Mutex_new();
 
        /* Initialize the thread lists. */
 
@@ -88,7 +88,7 @@ void threadlist_init(void)
 
 void threadlist_lock(void)
 {
-       mutex_lock(&threadlist_mutex);
+       Mutex_lock(threadlist_mutex);
 }
 
 
@@ -100,7 +100,7 @@ void threadlist_lock(void)
 
 void threadlist_unlock(void)
 {
-       mutex_unlock(&threadlist_mutex);
+       Mutex_unlock(threadlist_mutex);
 }