Merged with tip.
authorPeter Molnar <pm@complang.tuwien.ac.at>
Wed, 9 Jul 2008 18:00:49 +0000 (20:00 +0200)
committerPeter Molnar <pm@complang.tuwien.ac.at>
Wed, 9 Jul 2008 18:00:49 +0000 (20:00 +0200)
1  2 
configure.ac
src/threads/posix/thread-posix.c
src/threads/posix/thread-posix.h
src/vm/builtin.c
src/vm/builtin.h
src/vm/global.h
src/vm/jit/i386/codegen.c
src/vm/jit/i386/emit.c
src/vm/jit/i386/linux/md-os.c
src/vm/jit/trap.c
src/vmcore/linker.c

diff --cc configure.ac
Simple merge
index 3c2c2b237b2f21289c3e3469027ae21de78e5a44,bfcdc58a7c37ac9a54196457e05b455b117897e6..defe4220e711761f2d8aad96266ddc0c50bd6428
@@@ -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 ***************************************************
index 349b5c33248f26e231778bd6d947db17615b7b63,5c107f86372897e8c42410d06ea12f11817b83b0..bb8b4206d9efdf30553678d0d6785b34d0e58e1e
@@@ -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"
  
Simple merge
Simple merge
diff --cc src/vm/global.h
Simple merge
Simple merge
Simple merge
Simple merge
Simple merge
Simple merge