=================================================================== RCS file: /home/cvs/OpenXM_contrib2/asir2000/gc/solaris_threads.c,v retrieving revision 1.1.1.1 retrieving revision 1.3 diff -u -p -r1.1.1.1 -r1.3 --- OpenXM_contrib2/asir2000/gc/solaris_threads.c 1999/12/03 07:39:10 1.1.1.1 +++ OpenXM_contrib2/asir2000/gc/solaris_threads.c 2001/04/20 07:39:19 1.3 @@ -16,10 +16,10 @@ */ /* 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 "solaris_threads.h" +# include "private/gc_priv.h" +# include "private/solaris_threads.h" # include # include # include @@ -558,6 +558,11 @@ void GC_old_stacks_are_fresh() # define THREAD_TABLE_SZ 128 /* Must be power of 2 */ 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. */ /* Caller holds allocation lock. */ GC_thread GC_new_thread(thread_t id) @@ -573,7 +578,7 @@ GC_thread GC_new_thread(thread_t id) /* Dont acquire allocation lock, since we may already hold it. */ } else { 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); result -> id = id; @@ -627,7 +632,7 @@ word GC_get_orig_stack_size() { result = (word)rl.rlim_cur & ~(HBLKSIZE-1); if (result > MAX_ORIG_STACK_SIZE) { 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; } result = MAX_ORIG_STACK_SIZE; @@ -661,7 +666,8 @@ void GC_my_stack_limits() } -/* We hold allocation lock. We assume the world is stopped. */ +/* We hold allocation lock. Should do exactly the right thing if the */ +/* world is stopped. Should not fail if it isn't. */ void GC_push_all_stacks() { register int i; @@ -672,7 +678,7 @@ void GC_push_all_stacks() # define PUSH(bottom,top) \ 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); \ } else { \ GC_push_all_stack((bottom), (top)); \ @@ -702,7 +708,6 @@ int GC_is_thread_stack(ptr_t addr) register int i; register GC_thread p; register ptr_t bottom, top; - struct rlimit rl; for (i = 0; i < THREAD_TABLE_SZ; i++) { for (p = GC_threads[i]; p != 0; p = p -> next) { @@ -713,6 +718,7 @@ int GC_is_thread_stack(ptr_t addr) } } } + return 0; } /* The only thread that ever really performs a thr_join. */ @@ -900,7 +906,7 @@ GC_thr_create(void *stack_base, size_t stack_size, } GC_multithreaded++; if (stack == 0) { - if (stack_size == 0) stack_size = GC_min_stack_sz; + if (stack_size == 0) stack_size = 1024*1024; stack = (void *)GC_stack_alloc(&stack_size); if (stack == 0) { GC_multithreaded--;