summaryrefslogtreecommitdiff
path: root/solaris_threads.c
diff options
context:
space:
mode:
Diffstat (limited to 'solaris_threads.c')
-rw-r--r--solaris_threads.c19
1 files changed, 12 insertions, 7 deletions
diff --git a/solaris_threads.c b/solaris_threads.c
index c3b0b15..8cc6319 100644
--- a/solaris_threads.c
+++ b/solaris_threads.c
@@ -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 <thread.h>
# include <synch.h>
# include <signal.h>
@@ -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;
@@ -673,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)); \
@@ -703,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) {
@@ -714,6 +718,7 @@ int GC_is_thread_stack(ptr_t addr)
}
}
}
+ return 0;
}
/* The only thread that ever really performs a thr_join. */