summaryrefslogtreecommitdiff
path: root/boehm-gc/solaris_threads.c
diff options
context:
space:
mode:
authorbryce <bryce@138bc75d-0d04-0410-961f-82ee72b054a4>2001-05-21 08:35:14 +0000
committerbryce <bryce@138bc75d-0d04-0410-961f-82ee72b054a4>2001-05-21 08:35:14 +0000
commitf8c1da573b1b2b72501630f18fc1452e6b9e9c0c (patch)
tree67e9db3b367c46dfbcccda8278d06da72494187d /boehm-gc/solaris_threads.c
parent1826adcc0c69a1dd8d750b1bf7cb5657d8403ae1 (diff)
downloadgcc-f8c1da573b1b2b72501630f18fc1452e6b9e9c0c.tar.gz
Imported version version 6.0alpha7.
* README, README.Mac, README.OS2, README.QUICK, README.alpha, README.amiga, README.debugging, README.dj, README.hp, README.linux, README.rs6000, README.sgi, README.solaris2, README.uts, README.win32, SCoptions.amiga, backptr.h, barrett_diagram, dbg_mlc.h, gc.h, gc.man, gc_alloc.h, gc_cpp.h, gc_hdrs.h, gc_mark.h, gc_priv.h, gc_private.h, gc_typed.h, gcconfig.h, hpux_irix_threads.c, makefile.depend, nursery.c, solaris_threads.h, test.c, test_cpp.cc, weakpointer.h, cord/README, cord/SCOPTIONS.amiga, cord/SMakefile.amiga, cord/cord.h, cord/ec.h, cord/gc.h, cord/private/cord_pos.h, include/backptr.h, include/gc_copy_descr.h, include/gc_nursery.h: Remove obsolete/moved files. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@42379 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'boehm-gc/solaris_threads.c')
-rw-r--r--boehm-gc/solaris_threads.c19
1 files changed, 12 insertions, 7 deletions
diff --git a/boehm-gc/solaris_threads.c b/boehm-gc/solaris_threads.c
index c3b0b15b97c..8cc6319cd22 100644
--- a/boehm-gc/solaris_threads.c
+++ b/boehm-gc/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. */