X-Git-Url: http://wien.tomnetworks.com/gitweb/?a=blobdiff_plain;f=libgc%2Fsolaris_threads.c;h=e67c514c7988a59a7fea854669ac86f397405f98;hb=b4ef279dd767faf5bc881a17eb2dae07f07c0026;hp=5c49c1206b8176d85a09aa1fa7f33ca2ebf1e56a;hpb=096265478e6e4145c90250a5bf78c0c179ee50af;p=mono.git diff --git a/libgc/solaris_threads.c b/libgc/solaris_threads.c index 5c49c1206b8..e67c514c798 100644 --- a/libgc/solaris_threads.c +++ b/libgc/solaris_threads.c @@ -19,6 +19,13 @@ # include "private/gc_priv.h" # if defined(GC_SOLARIS_THREADS) || defined(GC_SOLARIS_PTHREADS) + +/* Avoid #error"Cannot use procfs in the large file compilation environment" */ +#if defined(_ILP32) && (_FILE_OFFSET_BITS != 32) +#undef _FILE_OFFSET_BITS +#define _FILE_OFFSET_BITS 32 +#endif + # include "private/solaris_threads.h" # include # include @@ -635,10 +642,19 @@ int GC_thread_is_registered (void) return ptr ? 1 : 0; } -int GC_thread_register_foreign (void *base_addr) +void GC_allow_register_threads (void) +{ + /* No-op for GC pre-v7. */ +} + +int GC_register_my_thread (struct GC_stack_base *sb) { /* FIXME: */ - return 0; + return GC_UNIMPLEMENTED; +} + +void GC_register_altstack (void *stack, int stack_size, void *altstack, int altstack_size) +{ } /* Solaris 2/Intel uses an initial stack size limit slightly bigger than the @@ -663,7 +679,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\n", result); + /* WARN("Large stack limit(%ld): only scanning 8 MB\n", result); */ warned = 1; } result = MAX_ORIG_STACK_SIZE; @@ -780,18 +796,20 @@ void * GC_thr_daemon(void * dummy) UNLOCK(); } else { t = GC_lookup_thread(departed); - GC_multithreaded--; - if (!(t -> flags & CLIENT_OWNS_STACK)) { - GC_stack_free(t -> stack, t -> stack_size); - } - if (t -> flags & DETACHED) { - GC_delete_thread(departed); - } else { - t -> status = status; - t -> flags |= FINISHED; - cond_signal(&(t -> join_cv)); - cond_broadcast(&GC_prom_join_cv); - } + GC_multithreaded--; + if (t) { + if (!(t -> flags & CLIENT_OWNS_STACK)) { + GC_stack_free(t -> stack, t -> stack_size); + } + if (t -> flags & DETACHED) { + GC_delete_thread(departed); + } else { + t -> status = status; + t -> flags |= FINISHED; + cond_signal(&(t -> join_cv)); + cond_broadcast(&GC_prom_join_cv); + } + } UNLOCK(); } }