This is the mail archive of the java-patches@sourceware.cygnus.com mailing list for the Java project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Patch: GC_5_0_ALPHA_1


I have created a GC_5_0_ALPHA_1 branch containing the latest version of
the boehm collector, and merged in the previous libgcj gc patches (some
of these had already been applied to the gc distribution or have
functional equivalents).

There were some difficulties with the Jeff Sturm's alpha patches because
some of the platform specific stuff has been reorganized already (eg
GC_init_linux_data_start() in os_dep.c), and there have been alpha
changes made already to the gc distribution since 4.13a2. It probibly
needs to be retested on alpha before it gets merged into the trunk.

Based on a few quick benchmarks, 5.0a1 seems somewhat (10-15%) faster at
doing many rapid allocations than 4.13, and also grows a slightly
smaller heap in some circumstances. It unfortunatly does not fix the
problems with blocking IO and Linux Threads, infact it seems even more
broken (hangs on large allocations) when MPROTECT_VDB is defined (works
very well without it). I have thus commented out MPROTECT_VDB (for
Linux) in gcconfig.h.

ChangeLog:

1999-07-17  Bryce McKinlay  <bryce@albatross.co.nz>

        * Imported Boehm GC 5.0a1
        * config.h: removed (now gcconfig.h)
        * Makefile.am, Makefile.in, configure, configure.in: 'config.h'
->
        'gcconfig.h'
        * alloc.c, dbg_mlc.c, gc.h, gc_priv.h, linux_threads.c, mark.c,
        misc.c, os_dep.c, solaris_pthreads.c: merge previous GC patches.

        * gcconfig.h: don't define MPROTECT_VDB on Linux due to problems

        with threads & blocking I/O.

patch (against gc-5.0a1 distribution) attached

regards

  [ bryce ]


Index: Makefile.am
===================================================================
RCS file: /cvs/java/libgcj/boehm-gc/Makefile.am,v
retrieving revision 1.7
diff -u -r1.7 Makefile.am
--- Makefile.am	1999/06/30 12:42:29	1.7
+++ Makefile.am	1999/07/17 11:41:30
@@ -26,7 +26,7 @@
 toolexeclib_LTLIBRARIES = $(target_all)
 EXTRA_LTLIBRARIES = libgcjgc.la
 libgcjgc_la_SOURCES = allchblk.c alloc.c blacklst.c checksums.c	\
-config.h dbg_mlc.c dyn_load.c finalize.c gc.h gc_alloc.h gc_cpp.h \
+gcconfig.h dbg_mlc.c dyn_load.c finalize.c gc.h gc_alloc.h gc_cpp.h \
 gc_hdrs.h gc_mark.h gc_priv.h gc_private.h gc_typed.h headers.c	\
 irix_threads.c linux_threads.c malloc.c mallocx.c mark.c mark_rts.c \
 misc.c new_hblk.c obj_map.c os_dep.c pcr_interface.c ptr_chck.c	\
@@ -51,7 +51,7 @@
 
 ## FIXME: relies on internal code generated by automake.
 all_objs = @addobjs@ $(libgcjgc_la_OBJECTS)
-$(all_objs) : config.h gc_priv.h gc_hdrs.h gc.h gc_mark.h
+$(all_objs) : gcconfig.h gc_priv.h gc_hdrs.h gc.h gc_mark.h
 
 ## FIXME: we shouldn't have to do this, but automake forces us to.
 .s.lo:
Index: Makefile.in
===================================================================
RCS file: /cvs/java/libgcj/boehm-gc/Makefile.in,v
retrieving revision 1.8
diff -u -r1.8 Makefile.in
--- Makefile.in	1999/06/30 12:42:31	1.8
+++ Makefile.in	1999/07/17 11:41:30
@@ -108,7 +108,7 @@
 toolexeclib_LTLIBRARIES = $(target_all)
 EXTRA_LTLIBRARIES = libgcjgc.la
 libgcjgc_la_SOURCES = allchblk.c alloc.c blacklst.c checksums.c	\
-config.h dbg_mlc.c dyn_load.c finalize.c gc.h gc_alloc.h gc_cpp.h \
+gcconfig.h dbg_mlc.c dyn_load.c finalize.c gc.h gc_alloc.h gc_cpp.h \
 gc_hdrs.h gc_mark.h gc_priv.h gc_private.h gc_typed.h headers.c	\
 irix_threads.c linux_threads.c malloc.c mallocx.c mark.c mark_rts.c \
 misc.c new_hblk.c obj_map.c os_dep.c pcr_interface.c ptr_chck.c	\
@@ -484,7 +484,7 @@
 mostlyclean-generic distclean-generic clean-generic \
 maintainer-clean-generic clean mostlyclean distclean maintainer-clean
 
-$(all_objs) : config.h gc_priv.h gc_hdrs.h gc.h gc_mark.h
+$(all_objs) : gcconfig.h gc_priv.h gc_hdrs.h gc.h gc_mark.h
 
 .s.lo:
 	$(LTCOMPILE) -x assembler-with-cpp -c $<
Index: alloc.c
===================================================================
RCS file: /cvs/java/libgcj/boehm-gc/alloc.c,v
retrieving revision 1.3.2.1
diff -u -r1.3.2.1 alloc.c
--- alloc.c	1999/07/17 10:47:30	1.3.2.1
+++ alloc.c	1999/07/17 11:41:32
@@ -104,6 +104,7 @@
     static unsigned count = 0;
     unsigned long time_diff;
     
+#ifndef NO_CLOCK
     if ((count++ & 3) != 0) return(0);
     GET_TIME(current_time);
     time_diff = MS_TIME_DIFF(current_time,GC_start_time);
@@ -116,6 +117,7 @@
     	return(1);
     }
     return(0);
+#endif /* NO_CLOCK */    
   }
 #endif /* !SMALL_CONFIG */
 
@@ -253,7 +255,9 @@
         /* We try to mark with the world stopped.	*/
         /* If we run out of time, this turns into	*/
         /* incremental marking.			*/
+#ifndef NO_CLOCK
         GET_TIME(GC_start_time);
+#endif NO_CLOCK	
         if (GC_stopped_mark(GC_timeout_stop_func)) {
 #           ifdef SAVE_CALL_CHAIN
                 GC_save_callers(GC_last_stack);
Index: alpha_mach_dep.s
===================================================================
RCS file: /cvs/java/libgcj/boehm-gc/alpha_mach_dep.s,v
retrieving revision 1.3.2.1
diff -u -r1.3.2.1 alpha_mach_dep.s
--- alpha_mach_dep.s	1999/07/17 10:47:30	1.3.2.1
+++ alpha_mach_dep.s	1999/07/17 11:41:32
@@ -1,4 +1,4 @@
- # $Id: alpha_mach_dep.s,v 1.3.2.1 1999/07/17 10:47:30 bryce Exp $
+ # $Id: alpha_mach_dep.s,v 1.2 1993/01/18 22:54:51 dosser Exp $
 
 # define call_push(x)    						\
 	lda   $16, 0(x);    	/* copy x to first argument register */	\
Index: configure
===================================================================
RCS file: /cvs/java/libgcj/boehm-gc/configure,v
retrieving revision 1.9
diff -u -r1.9 configure
--- configure	1999/06/30 12:43:21	1.9
+++ configure	1999/07/17 11:41:34
@@ -3141,7 +3141,7 @@
 EOF
 
 cat >> $CONFIG_STATUS <<EOF
-ac_sources="config.h"
+ac_sources="gcconfig.h"
 ac_dests="boehm-config.h"
 EOF
 
Index: configure.in
===================================================================
RCS file: /cvs/java/libgcj/boehm-gc/configure.in,v
retrieving revision 1.9
diff -u -r1.9 configure.in
--- configure.in	1999/06/30 12:43:24	1.9
+++ configure.in	1999/07/17 11:41:34
@@ -191,7 +191,7 @@
 dnl It is required to use gc_priv.h, which is required to write
 dnl a new marking function.  So config.h in this package is
 dnl poorly named.
-AC_LINK_FILES(config.h, boehm-config.h)
+AC_LINK_FILES(gcconfig.h, boehm-config.h)
 
 dnl This is something of a hack.  When cross-compiling we turn off
 dnl some functionality.  We also enable the "small" configuration.
Index: dbg_mlc.c
===================================================================
RCS file: /cvs/java/libgcj/boehm-gc/dbg_mlc.c,v
retrieving revision 1.3.2.1
diff -u -r1.3.2.1 dbg_mlc.c
--- dbg_mlc.c	1999/07/17 10:47:30	1.3.2.1
+++ dbg_mlc.c	1999/07/17 11:41:35
@@ -85,6 +85,16 @@
     return(FALSE);
 }
 
+/* Return start of object that might have debugging info.  */
+ptr_t GC_debug_object_start(p)
+ptr_t p;
+{
+    register word * result = (word *)((oh *)p + 1);
+    if (! GC_has_debug_info(p))
+        return(p);
+    return((ptr_t)result);
+}
+
 /* Store debugging info into p.  Return displaced pointer. */
 /* Assumes we don't hold allocation lock.		   */
 ptr_t GC_store_debug_info(p, sz, string, integer)
@@ -231,6 +241,35 @@
     }
     if (!GC_debugging_started) {
     	GC_start_debugging();
+    }
+    ADD_CALL_CHAIN(result, ra);
+    return (GC_store_debug_info(result, (word)lb, s, (word)i));
+}
+
+# ifdef __STDC__
+    GC_PTR GC_debug_generic_malloc(size_t lb, int k, EXTRA_ARGS)
+# else
+    GC_PTR GC_debug_malloc(lb, k, s, i)
+    size_t lb;
+    int k;
+    char * s;
+    int i;
+#   ifdef GC_ADD_CALLER
+       --> GC_ADD_CALLER not implemented for K&R C
+#   endif
+# endif
+{
+    GC_PTR result = GC_generic_malloc(lb + DEBUG_BYTES, k);
+    
+    if (result == 0) {
+        GC_err_printf1("GC_debug_malloc(%ld) returning NIL (",
+                      (unsigned long) lb);
+        GC_err_puts(s);
+        GC_err_printf1(":%ld)\n", (unsigned long)i);
+        return(0);
+    }
+    if (!GC_debugging_started) {
+       GC_start_debugging();
     }
     ADD_CALL_CHAIN(result, ra);
     return (GC_store_debug_info(result, (word)lb, s, (word)i));
Index: dyn_load.c
===================================================================
RCS file: /cvs/java/libgcj/boehm-gc/dyn_load.c,v
retrieving revision 1.4.2.1
diff -u -r1.4.2.1 dyn_load.c
--- dyn_load.c	1999/07/17 10:47:30	1.4.2.1
+++ dyn_load.c	1999/07/17 11:41:35
@@ -161,7 +161,8 @@
 
 # if defined(SUNOS4) || defined(SUNOS5DL)
 /* Add dynamic library data sections to the root set.		*/
-# if !defined(PCR) && !defined(SOLARIS_THREADS) && defined(THREADS)
+# if !defined(PCR) && !defined(SOLARIS_THREADS) \
+       && !defined(QUICK_THREADS) && defined(THREADS)
 #   ifndef SRC_M3
 	--> fix mutual exclusion with dlopen
 #   endif  /* We assume M3 programs don't call dlopen for now */
Index: gc.h
===================================================================
RCS file: /cvs/java/libgcj/boehm-gc/gc.h,v
retrieving revision 1.3.2.1
diff -u -r1.3.2.1 gc.h
--- gc.h	1999/07/17 10:47:30	1.3.2.1
+++ gc.h	1999/07/17 11:41:36
@@ -355,6 +355,8 @@
 	GC_debug_register_finalizer(p, f, d, of, od)
 #   define GC_REGISTER_FINALIZER_IGNORE_SELF(p, f, d, of, od) \
 	GC_debug_register_finalizer_ignore_self(p, f, d, of, od)
+#   define GC_REGISTER_FINALIZER_NO_ORDER(p, f, d, of, od) \
+       GC_debug_register_finalizer_no_order(p, f, d, of, od)
 #   define GC_MALLOC_STUBBORN(sz) GC_debug_malloc_stubborn(sz, GC_EXTRAS);
 #   define GC_CHANGE_STUBBORN(p) GC_debug_change_stubborn(p)
 #   define GC_END_STUBBORN_CHANGE(p) GC_debug_end_stubborn_change(p)
@@ -371,6 +373,8 @@
 	GC_register_finalizer(p, f, d, of, od)
 #   define GC_REGISTER_FINALIZER_IGNORE_SELF(p, f, d, of, od) \
 	GC_register_finalizer_ignore_self(p, f, d, of, od)
+#   define GC_REGISTER_FINALIZER_NO_ORDER(p, f, d, of, od) \
+       GC_register_finalizer_no_order(p, f, d, of, od)
 #   define GC_MALLOC_STUBBORN(sz) GC_malloc_stubborn(sz)
 #   define GC_CHANGE_STUBBORN(p) GC_change_stubborn(p)
 #   define GC_END_STUBBORN_CHANGE(p) GC_end_stubborn_change(p)
@@ -446,6 +450,15 @@
 	GC_PROTO((GC_PTR obj, GC_finalization_proc fn, GC_PTR cd,
 		  GC_finalization_proc *ofn, GC_PTR *ocd));
 GC_API void GC_debug_register_finalizer_ignore_self
+       GC_PROTO((GC_PTR obj, GC_finalization_proc fn, GC_PTR cd,
+                 GC_finalization_proc *ofn, GC_PTR *ocd));
+
+/* Another version of the above.  It ignores all cycles.        */
+/* It should probably only be used by Java implementations.     */
+GC_API void GC_register_finalizer_no_order
+       GC_PROTO((GC_PTR obj, GC_finalization_proc fn, GC_PTR cd,
+                 GC_finalization_proc *ofn, GC_PTR *ocd));
+GC_API void GC_debug_register_finalizer_no_order
 	GC_PROTO((GC_PTR obj, GC_finalization_proc fn, GC_PTR cd,
 		  GC_finalization_proc *ofn, GC_PTR *ocd));
 
Index: gc_priv.h
===================================================================
RCS file: /cvs/java/libgcj/boehm-gc/gc_priv.h,v
retrieving revision 1.4.2.1
diff -u -r1.4.2.1 gc_priv.h
--- gc_priv.h	1999/07/17 10:47:31	1.4.2.1
+++ gc_priv.h	1999/07/17 11:41:37
@@ -445,10 +445,32 @@
 		: "0"(1), "m"(*(addr)));
 	  return oldval;
        }
+       inline static void GC_clear(volatile unsigned int *addr) {
+          *(addr) = 0;
+       }
+#    elif defined(__alpha__)
+       inline static int GC_test_and_set(volatile unsigned int *addr) {
+        long oldval, temp;
+
+        __asm__ __volatile__(
+              "1:\tldl_l %0,%3\n"
+              "\tbne %0,2f\n"
+              "\tor $31,1,%1\n"
+              "\tstl_c %1,%2\n"
+              "\tbeq %1,1b\n"
+              "2:\tmb\n"
+              : "=&r"(oldval), "=&r"(temp), "=m"(*(addr))
+              : "m"(*(addr))
+              : "memory");
+        return (int)oldval;
+       }
+       inline static void GC_clear(volatile unsigned int *addr) {
+          __asm__ __volatile__("mb": : :"memory");
+          *(addr) = 0;
+       }
 #    else
        -- > Need implementation of GC_test_and_set()
 #    endif
-#    define GC_clear(addr) (*(addr) = 0)
 
      extern volatile unsigned int GC_allocate_lock;
 	/* This is not a mutex because mutexes that obey the (optional)     */
@@ -531,6 +553,10 @@
 #    define LOCK() EnterCriticalSection(&GC_allocate_ml);
 #    define UNLOCK() LeaveCriticalSection(&GC_allocate_ml);
 #  endif
+#  ifdef QUICK_THREADS
+#    define LOCK()
+#    define UNLOCK()
+#  endif
 #  ifndef SET_LOCK_HOLDER
 #      define SET_LOCK_HOLDER()
 #      define UNSET_LOCK_HOLDER()
@@ -1626,6 +1652,10 @@
 			/* P points to somewhere inside an object with	*/
 			/* debugging info.  Print a human readable	*/
 			/* description of the object to stderr.		*/
+ptr_t GC_debug_object_start(/* ptr_t p */);
+                        /* P points to the start of an object that may  */
+                        /* have debug info at its head.  Return the     */
+                        /* start of the real data.                      */		
 extern void (*GC_check_heap)();
 			/* Check that all objects in the heap with 	*/
 			/* debugging info are intact.  Print 		*/
Index: gcconfig.h
===================================================================
RCS file: /cvs/java/libgcj/boehm-gc/gcconfig.h,v
retrieving revision 1.1.1.1.2.1
diff -u -r1.1.1.1.2.1 gcconfig.h
--- gcconfig.h	1999/07/17 10:47:31	1.1.1.1.2.1
+++ gcconfig.h	1999/07/17 11:41:37
@@ -690,7 +690,9 @@
 	/* Probably needs to be more flexible, but I don't yet 		*/
 	/* fully understand how flexible.				*/
 #       if !defined(LINUX_THREADS) || !defined(REDIRECT_MALLOC)
-#	    define MPROTECT_VDB
+/* MPROTECT_VDB seems cause problems with blocking I/O calls and threads
+  in libgcj. Commented out here as a workaround. */
+// #	    define MPROTECT_VDB
 #	else
 	    /* We seem to get random errors in incremental mode,	*/
 	    /* possibly because Linux threads is itself a malloc client */
Index: linux_threads.c
===================================================================
RCS file: /cvs/java/libgcj/boehm-gc/linux_threads.c,v
retrieving revision 1.3.2.1
diff -u -r1.3.2.1 linux_threads.c
--- linux_threads.c	1999/07/17 10:47:31	1.3.2.1
+++ linux_threads.c	1999/07/17 11:41:38
@@ -123,8 +123,13 @@
 which is a symbol defined in LinuxThreads, but (hopefully) not in other
 thread packages.
 */
+#if 0
+/* Note: on Caldera OpenLinux, this symbols is `local' in the
+   libpthread.so (but not in libpthread.a).  We don't really need
+   this, so we just comment it out.  */
 extern char * __pthread_initial_thread_bos;
 char **dummy_var_to_force_linux_threads = &__pthread_kill_other_threads_np;
+#endif
 
 #define LINUX_THREADS_STACK_SIZE  (2 * 1024 * 1024)
 
Index: mark.c
===================================================================
RCS file: /cvs/java/libgcj/boehm-gc/mark.c,v
retrieving revision 1.3.2.1
diff -u -r1.3.2.1 mark.c
--- mark.c	1999/07/17 10:47:31	1.3.2.1
+++ mark.c	1999/07/17 11:41:39
@@ -481,6 +481,9 @@
         case DS_PROC:
           GC_mark_stack_top_reg--;
           credit -= PROC_BYTES;
+#ifdef GC_DEBUG
+          current_p = GC_debug_object_start(current_p);
+#endif	  
           GC_mark_stack_top_reg =
               (*PROC(descr))
               	    (current_p, GC_mark_stack_top_reg,
Index: misc.c
===================================================================
RCS file: /cvs/java/libgcj/boehm-gc/misc.c,v
retrieving revision 1.5.2.1
diff -u -r1.5.2.1 misc.c
--- misc.c	1999/07/17 10:47:31	1.5.2.1
+++ misc.c	1999/07/17 11:41:39
@@ -49,7 +49,11 @@
 #		endif
 	        pthread_t GC_lock_holder = NO_THREAD;
 #	      else
-	        --> declare allocator lock here
+#               if defined(QUICK_THREADS)
+                    /* Nothing.  */
+#               else
+                   --> declare allocator lock here
+#               endif	
 #	      endif
 #	   endif
 #	endif
@@ -392,6 +396,10 @@
 
 GC_bool GC_is_initialized = FALSE;
 
+#if defined(SOLARIS_THREADS) || defined(IRIX_THREADS)
+    extern void GC_thr_init();
+#endif
+
 void GC_init()
 {
     DCL_LOCK_STATE;
@@ -440,7 +448,8 @@
         GC_thr_init();
 #   endif
 #   if !defined(THREADS) || defined(SOLARIS_THREADS) || defined(WIN32_THREADS) \
-       || defined(IRIX_THREADS) || defined(LINUX_THREADS)
+       || defined(IRIX_THREADS) || defined(LINUX_THREADS) \
+       || defined (QUICK_THREADS)
       if (GC_stackbottom == 0) {
 	GC_stackbottom = GC_get_stack_base();
       }
@@ -644,7 +653,7 @@
 # endif
 #endif
 
-#if !defined(MSWIN32)  && !defined(OS2) && !defined(MACOS)
+#if !defined(MSWIN32)  && !defined(OS2) && !defined(MACOS) && !defined(ECOS)
 int GC_write(fd, buf, len)
 int fd;
 char *buf;
@@ -666,6 +675,14 @@
     return(bytes_written);
 }
 #endif /* UN*X */
+
+#if defined(ECOS)
+int GC_write(fd, buf, len)
+{
+  _Jv_diag_write (buf, len);
+  return len;
+}
+#endif
 
 #ifdef MSWIN32
 #   define WRITE(f, buf, len) (GC_set_files(), \
Index: os_dep.c
===================================================================
RCS file: /cvs/java/libgcj/boehm-gc/os_dep.c,v
retrieving revision 1.5.2.1
diff -u -r1.5.2.1 os_dep.c
--- os_dep.c	1999/07/17 10:47:31	1.5.2.1
+++ os_dep.c	1999/07/17 11:41:40
@@ -72,7 +72,7 @@
 #   define NEED_FIND_LIMIT
 # endif
 
-# if defined(LINUX) && (defined(POWERPC) || defined(SPARC))
+# if defined(LINUX) && (defined(POWERPC) || defined(SPARC)|| defined(ALPHA))
 #   define NEED_FIND_LIMIT
 # endif
 
@@ -156,6 +156,40 @@
   }
 #endif
 
+# ifdef ECOS
+
+# ifndef ECOS_GC_MEMORY_SIZE
+# define ECOS_GC_MEMORY_SIZE (448 * 1024)
+# endif /* ECOS_GC_MEMORY_SIZE */
+
+// setjmp() function, as described in ANSI para 7.6.1.1
+#define setjmp( __env__ )  hal_setjmp( __env__ )
+
+// FIXME: This is a simple way of allocating memory which is
+// compatible with ECOS early releases.  Later releases use a more
+// sophisticated means of allocating memory than this simple static
+// allocator, but this method is at least bound to work.
+static char memory[ECOS_GC_MEMORY_SIZE];
+static char *brk = memory;
+
+static void *tiny_sbrk(ptrdiff_t increment)
+{
+  void *p = brk;
+
+  brk += increment;
+
+  if (brk >  memory + sizeof memory)
+    {
+      brk -= increment;
+      return NULL;
+    }
+
+  return p;
+}
+#define sbrk tiny_sbrk
+# endif /* ECOS */
+
+
 # ifdef OS2
 
 # include <stddef.h>
@@ -260,7 +294,8 @@
 # else
 
 #  if !defined(PCR) && !defined(AMIGA) && !defined(MSWIN32) \
-      && !defined(MACOS) && !defined(DJGPP) && !defined(DOS4GW)
+      && !defined(MACOS) && !defined(DJGPP) && !defined(DOS4GW) \
+      && !defined(NO_SIGSET)
 
 #   if defined(sigmask) && !defined(UTS4)
 	/* Use the traditional BSD interface */
@@ -335,7 +370,7 @@
 # endif /*!OS/2 */
 
 /* Ivan Demakov: simplest way (to me) */
-#ifdef DOS4GW
+#if defined (DOS4GW) || defined (NO_SIGSET)
   void GC_disable_signals() { }
   void GC_enable_signals() { }
 #endif
@@ -506,6 +541,7 @@
     
     void GC_setup_temporary_fault_handler()
     {
+# ifndef ECOS
 #	if defined(SUNOS5SIGS) || defined(IRIX5) || defined(OSF1)
 	  struct sigaction	act;
 
@@ -538,10 +574,12 @@
 	    old_bus_handler = signal(SIGBUS, GC_fault_handler);
 #	  endif
 #	endif
+# endif /* ECOS */
     }
     
     void GC_reset_fault_handler()
     {
+# ifndef ECOS
 #       if defined(SUNOS5SIGS) || defined(IRIX5) || defined(OSF1)
 	  (void) sigaction(SIGSEGV, &old_segv_act, 0);
 #	  ifdef _sigargs	/* Irix 5.x, not 6.x */
@@ -553,6 +591,7 @@
 	    (void) signal(SIGBUS, old_bus_handler);
 #	  endif
 #       endif
+# endif /* ECOS */
     }
 
     /* Return the first nonaddressible location > p (up) or 	*/
@@ -561,6 +600,7 @@
     ptr_t p;
     GC_bool up;
     {
+# ifndef ECOS    
         static VOLATILE ptr_t result;
     		/* Needs to be static, since otherwise it may not be	*/
     		/* preserved across the longjmp.  Can safely be 	*/
@@ -586,10 +626,13 @@
 	    result += MIN_PAGE_SIZE;
  	}
 	return(result);
+# else /* ECOS */
+       abort();
+# endif /* ECOS */	
     }
 # endif
-
 
+# ifndef ECOS
 ptr_t GC_get_stack_base()
 {
     word dummy;
@@ -597,6 +640,10 @@
 
 #   define STACKBOTTOM_ALIGNMENT_M1 ((word)STACK_GRAN - 1)
 
+#  if defined(STACKBASE)
+    extern ptr_t STACKBASE;
+    return(STACKBASE);
+#   else
 #   ifdef STACKBOTTOM
 	return(STACKBOTTOM);
 #   else
@@ -635,8 +682,10 @@
 #	endif
     	return(result);
 #   endif /* STACKBOTTOM */
+#   endif /* STACKBASE */
 }
 
+# endif /* ECOS */
 # endif /* ! AMIGA */
 # endif /* ! OS2 */
 # endif /* ! MSWIN32 */
@@ -1443,7 +1492,7 @@
 
 # if defined(SOLARIS_THREADS) || defined(WIN32_THREADS) \
      || defined(IRIX_THREADS) || defined(LINUX_THREADS) \
-     || defined(IRIX_PCR_THREADS)
+     || defined(IRIX_PCR_THREADS) || defined(QUICK_THREADS)
 
 extern void GC_push_all_stacks();
 
Index: solaris_pthreads.c
===================================================================
RCS file: /cvs/java/libgcj/boehm-gc/solaris_pthreads.c,v
retrieving revision 1.3.2.1
diff -u -r1.3.2.1 solaris_pthreads.c
--- solaris_pthreads.c	1999/07/17 10:47:32	1.3.2.1
+++ solaris_pthreads.c	1999/07/17 11:41:40
@@ -16,7 +16,7 @@
  * Modified Peter C. for Solaris Posix Threads.
  */
 /* Boehm, September 14, 1994 4:44 pm PDT */
-/* $Id: solaris_pthreads.c,v 1.3.2.1 1999/07/17 10:47:32 bryce Exp $ */
+/* $Id: solaris_pthreads.c,v 1.10 1997/05/13 23:09:09 peterc Exp $ */
 
 # if defined(_SOLARIS_PTHREADS)
 # include "gc_priv.h"

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]