# 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 <thread.h>
# include <synch.h>
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;
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();
}
}