#include "native/localref.h"
-#include "threads/mutex.h"
+#include "threads/condition.hpp"
+#include "threads/mutex.hpp"
#include "threads/posix/lock.h"
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 */
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);