From: Peter Molnar Date: Wed, 9 Jul 2008 18:00:49 +0000 (+0200) Subject: Merged with tip. X-Git-Url: http://wien.tomnetworks.com/gitweb/?p=cacao.git;a=commitdiff_plain;h=7659949229c634784f7d27aa8b679fdd4c8351ab Merged with tip. --- 7659949229c634784f7d27aa8b679fdd4c8351ab diff --cc src/threads/posix/thread-posix.c index 3c2c2b237,bfcdc58a7..defe4220e --- a/src/threads/posix/thread-posix.c +++ b/src/threads/posix/thread-posix.c @@@ -665,31 -465,16 +465,20 @@@ void threads_startworld(void void threads_impl_thread_init(threadobject *t) { - int result; - /* initialize the mutex and the condition */ - mutex_init(&t->flc_lock); + t->flc_lock = Mutex_new(); + t->flc_cond = Condition_new(); - result = pthread_cond_init(&t->flc_cond, NULL); - if (result != 0) - vm_abort_errnum(result, "threads_impl_thread_new: pthread_cond_init failed"); - - mutex_init(&(t->waitmutex)); - - result = pthread_cond_init(&(t->waitcond), NULL); - if (result != 0) - vm_abort_errnum(result, "threads_impl_thread_new: pthread_cond_init failed"); - - mutex_init(&(t->suspendmutex)); + t->waitmutex = Mutex_new(); + t->waitcond = Condition_new(); - result = pthread_cond_init(&(t->suspendcond), NULL); - if (result != 0) - vm_abort_errnum(result, "threads_impl_thread_new: pthread_cond_init failed"); + t->suspendmutex = Mutex_new(); + t->suspendcond = Condition_new(); + +#if defined(ENABLE_TLH) + tlh_init(&(t->tlh)); +#endif } /* threads_impl_thread_clear *************************************************** diff --cc src/threads/posix/thread-posix.h index 349b5c332,5c107f863..bb8b4206d --- a/src/threads/posix/thread-posix.h +++ b/src/threads/posix/thread-posix.h @@@ -40,13 -40,10 +40,14 @@@ typedef struct threadobject threadobjec #include "mm/memory.h" +#if defined(ENABLE_TLH) +#include "mm/tlh.h" +#endif + #include "native/localref.h" - #include "threads/mutex.h" + #include "threads/condition.hpp" + #include "threads/mutex.hpp" #include "threads/posix/lock.h"