[BACK]Return to solaris_threads.c CVS log [TXT][DIR] Up to [local] / OpenXM_contrib2 / asir2000 / gc

Diff for /OpenXM_contrib2/asir2000/gc/solaris_threads.c between version 1.2 and 1.3

version 1.2, 2000/12/01 09:26:13 version 1.3, 2001/04/20 07:39:19
Line 16 
Line 16 
  */   */
 /* Boehm, September 14, 1994 4:44 pm PDT */  /* Boehm, September 14, 1994 4:44 pm PDT */
   
 # if defined(SOLARIS_THREADS)  # if defined(GC_SOLARIS_THREADS) || defined(SOLARIS_THREADS)
   
 # include "gc_priv.h"  # include "private/gc_priv.h"
 # include "solaris_threads.h"  # include "private/solaris_threads.h"
 # include <thread.h>  # include <thread.h>
 # include <synch.h>  # include <synch.h>
 # include <signal.h>  # include <signal.h>
Line 558  void GC_old_stacks_are_fresh()
Line 558  void GC_old_stacks_are_fresh()
 # define THREAD_TABLE_SZ 128    /* Must be power of 2   */  # define THREAD_TABLE_SZ 128    /* Must be power of 2   */
 volatile GC_thread GC_threads[THREAD_TABLE_SZ];  volatile GC_thread GC_threads[THREAD_TABLE_SZ];
   
   void GC_push_thread_structures GC_PROTO((void))
   {
       GC_push_all((ptr_t)(GC_threads), (ptr_t)(GC_threads)+sizeof(GC_threads));
   }
   
 /* Add a thread to GC_threads.  We assume it wasn't already there.      */  /* Add a thread to GC_threads.  We assume it wasn't already there.      */
 /* Caller holds allocation lock.                                        */  /* Caller holds allocation lock.                                        */
 GC_thread GC_new_thread(thread_t id)  GC_thread GC_new_thread(thread_t id)
Line 573  GC_thread GC_new_thread(thread_t id)
Line 578  GC_thread GC_new_thread(thread_t id)
         /* Dont acquire allocation lock, since we may already hold it. */          /* Dont acquire allocation lock, since we may already hold it. */
     } else {      } else {
         result = (struct GC_Thread_Rep *)          result = (struct GC_Thread_Rep *)
                  GC_generic_malloc_inner(sizeof(struct GC_Thread_Rep), NORMAL);                   GC_INTERNAL_MALLOC(sizeof(struct GC_Thread_Rep), NORMAL);
     }      }
     if (result == 0) return(0);      if (result == 0) return(0);
     result -> id = id;      result -> id = id;
Line 627  word GC_get_orig_stack_size() {
Line 632  word GC_get_orig_stack_size() {
     result = (word)rl.rlim_cur & ~(HBLKSIZE-1);      result = (word)rl.rlim_cur & ~(HBLKSIZE-1);
     if (result > MAX_ORIG_STACK_SIZE) {      if (result > MAX_ORIG_STACK_SIZE) {
         if (!warned) {          if (!warned) {
             WARN("Large stack limit(%ld): only scanning 8 MB", result);              WARN("Large stack limit(%ld): only scanning 8 MB\n", result);
             warned = 1;              warned = 1;
         }          }
         result = MAX_ORIG_STACK_SIZE;          result = MAX_ORIG_STACK_SIZE;
Line 673  void GC_push_all_stacks()
Line 678  void GC_push_all_stacks()
   
 #   define PUSH(bottom,top) \  #   define PUSH(bottom,top) \
       if (GC_dirty_maintained) { \        if (GC_dirty_maintained) { \
         GC_push_dirty((bottom), (top), GC_page_was_ever_dirty, \          GC_push_selected((bottom), (top), GC_page_was_ever_dirty, \
                       GC_push_all_stack); \                        GC_push_all_stack); \
       } else { \        } else { \
         GC_push_all_stack((bottom), (top)); \          GC_push_all_stack((bottom), (top)); \
Line 703  int GC_is_thread_stack(ptr_t addr)
Line 708  int GC_is_thread_stack(ptr_t addr)
     register int i;      register int i;
     register GC_thread p;      register GC_thread p;
     register ptr_t bottom, top;      register ptr_t bottom, top;
     struct rlimit rl;  
   
     for (i = 0; i < THREAD_TABLE_SZ; i++) {      for (i = 0; i < THREAD_TABLE_SZ; i++) {
       for (p = GC_threads[i]; p != 0; p = p -> next) {        for (p = GC_threads[i]; p != 0; p = p -> next) {
Line 714  int GC_is_thread_stack(ptr_t addr)
Line 718  int GC_is_thread_stack(ptr_t addr)
         }          }
       }        }
     }      }
       return 0;
 }  }
   
 /* The only thread that ever really performs a thr_join.        */  /* The only thread that ever really performs a thr_join.        */

Legend:
Removed from v.1.2  
changed lines
  Added in v.1.3

FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>