Merge branch 'thread-dbg-msg-extend'
authorIvan Maidanski <ivmai@mail.ru>
Thu, 29 Dec 2011 14:50:57 +0000 (18:50 +0400)
committerIvan Maidanski <ivmai@mail.ru>
Thu, 29 Dec 2011 14:50:57 +0000 (18:50 +0400)
1  2 
darwin_stop_world.c
pthread_stop_world.c
pthread_support.c

Simple merge
@@@ -312,10 -311,9 +311,10 @@@ GC_INNER void GC_push_all_stacks(void
      pthread_t self = pthread_self();
      word total_size = 0;
  
 -    if (!GC_thr_initialized) GC_thr_init();
 +    if (!EXPECT(GC_thr_initialized, TRUE))
 +      GC_thr_init();
  #   ifdef DEBUG_THREADS
-       GC_log_printf("Pushing stacks from thread 0x%x\n", (unsigned)self);
+       GC_log_printf("Pushing stacks from thread %p\n", (void *)self);
  #   endif
      for (i = 0; i < THREAD_TABLE_SZ; i++) {
        for (p = GC_threads[i]; p != 0; p = p -> next) {
@@@ -474,9 -491,12 +492,12 @@@ STATIC GC_thread GC_new_thread(pthread_
      int hv = NUMERIC_THREAD_ID(id) % THREAD_TABLE_SZ;
      GC_thread result;
      static GC_bool first_thread_used = FALSE;
+ #   ifdef DEBUG_THREADS
+         GC_log_printf("Creating thread %p\n", (void *)id);
+ #   endif
  
      GC_ASSERT(I_HOLD_LOCK());
 -    if (!first_thread_used) {
 +    if (!EXPECT(first_thread_used, TRUE)) {
          result = &first_thread;
          first_thread_used = TRUE;
      } else {