Merged with tip.
[cacao.git] / src / threads / posix / thread-posix.h
index 349b5c33248f26e231778bd6d947db17615b7b63..bb8b4206d9efdf30553678d0d6785b34d0e58e1e 100644 (file)
@@ -46,7 +46,8 @@ typedef struct threadobject threadobject;
 
 #include "native/localref.h"
 
-#include "threads/mutex.h"
+#include "threads/condition.hpp"
+#include "threads/mutex.hpp"
 
 #include "threads/posix/lock.h"
 
@@ -131,19 +132,18 @@ struct threadobject {
        struct threadobject  *flc_list;     /* FLC list head for this thread      */
        struct threadobject  *flc_next;     /* next pointer for FLC list          */
        java_handle_t        *flc_object;
-       mutex_t               flc_lock;     /* controlling access to these fields */
-       pthread_cond_t        flc_cond;
+       Mutex*                flc_lock;     /* controlling access to these fields */
+       Condition*            flc_cond;
 
        /* these are used for the wait/notify implementation                      */
-       mutex_t               waitmutex;
-       pthread_cond_t        waitcond;
+       Mutex*                waitmutex;
+       Condition*            waitcond;
 
-       mutex_t               suspendmutex; /* lock before suspending this thread */
-       pthread_cond_t        suspendcond;  /* notify to resume this thread       */
+       Mutex*                suspendmutex; /* lock before suspending this thread */
+       Condition*            suspendcond;  /* notify to resume this thread       */
 
        bool                  interrupted;
        bool                  signaled;
-       bool                  sleeping;
 
        bool                  suspended;    /* is this thread suspended?          */
        s4                    suspend_reason; /* reason for suspending            */
@@ -284,8 +284,6 @@ void threads_start_thread(threadobject *thread, functionptr function);
 
 void threads_set_thread_priority(pthread_t tid, int priority);
 
-bool threads_detach_thread(threadobject *thread);
-
 #if defined(ENABLE_GC_CACAO)
 bool threads_suspend_thread(threadobject *thread, s4 reason);
 void threads_suspend_ack(u1* pc, u1* sp);