/* src/threads/posix/thread-posix.hpp - POSIX thread functions
- Copyright (C) 1996-2005, 2006, 2007, 2008
+ Copyright (C) 1996-2011
CACAOVM - Verein zur Foerderung der freien virtuellen Maschine CACAO
This file is part of CACAO.
s4 index; /* thread index, starting with 1 */
u4 flags; /* flag field */
u4 state; /* state field */
+ bool is_in_active_list; /* for debugging only */
pthread_t tid; /* pthread id */
#include "vm/jit/intrp/intrp.h"
#endif
-#if defined(__DARWIN__)
-# include <mach/mach.h>
-
-typedef struct {
- Mutex* mutex;
- Condition* cond;
- int value;
-} sem_t;
-
-#else
-# include <semaphore.h>
-#endif
-
// FIXME
#ifdef __cplusplus
result = pthread_setspecific(thread_current_key, t);
if (result != 0)
-#warning Use below method instead!
//os::abort_errnum(result, "thread_set_current: pthread_setspecific failed");
vm_abort("thread_set_current: pthread_setspecific failed");
#endif
/* functions ******************************************************************/
-void threads_sem_init(sem_t *sem, bool shared, int value);
-void threads_sem_wait(sem_t *sem);
-void threads_sem_post(sem_t *sem);
-
void threads_start_thread(threadobject *thread, functionptr function);
void threads_set_thread_priority(pthread_t tid, int priority);