]> granicus.if.org Git - gc/commitdiff
Moved libgc here too
authorMiguel de Icaza <miguel@gnome.org>
Thu, 11 Nov 2004 03:11:32 +0000 (03:11 +0000)
committerguest <ivmai@mail.ru>
Fri, 29 Jul 2011 11:23:46 +0000 (15:23 +0400)
svn path=/branches/mono-1-0/mono/; revision=35998

ChangeLog
Makefile.am
configure.in
include/gc_local_alloc.h
include/private/gc_priv.h
pthread_support.c

index d19f37792db3e6123eee3fd5cb7ae4068ae79860..0eed74946280151efa7baa632de8285933403c7f 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,50 +1,11 @@
-2004-08-20 Ben Maurer  <bmaurer@users.sourceforge.net>
-
-       * include/private/gc_priv.h: use the test glib does
-       for EXPECT.
-
-2004-08-20  Zoltan Varga  <vargaz@freemail.hu>
-
-       * include/private/gc_priv.h (__GNUC_PREREQ): Fix typo spotted by Ben.
-
-       * include/gc_local_alloc.h pthread_support.c: Add 
-       GC_local_gcj_fast_malloc.
-
-       * include/private/gc_priv.h (EXPECT): Enable this on modern versions
-       of gcc.
-
-2004-08-17 Ben Maurer  <bmaurer@users.sourceforge.net>
-
-       * pthread_support.c: make __thread variable static
-       
-       * include/gc_local_alloc.c: make the other headers get
-       included before we define our own variable. This fixes
-       up an ordering problem with GCJ and thread local alloc.
-       
-       The problem was that gc.h needed to include gc_local_alloc.h
-       before gc_gcj.h. However, when gc.h was included after
-       GC_LOCAL_ALLOC_H was #defined, it would not include
-       gc_local_alloc.h.
-
-2004-08-16  Zoltan Varga  <vargaz@freemail.hu>
-
-       * Makefile.am: Create a static version of libmonogc for inclusion into
-       the mono executable.
-
 2004-07-27  John Merryweather Cooper <john_m_cooper@yahoo.com>
-
-       * configure.in:  Fix to properly select flags for pthreads
-       on FreeBSD 4.x (aka -STABLE) and 5.x (aka -CURRENT).
+       # configure.in: Fix compiler flags selection to be correct for
+       both FreeBSD 4.x (aka -STABLE) and FreeBSD 5.x (aka -CURRENT).
        
 2004-07-01  Zoltan Varga  <vargaz@freemail.hu>
 
        * include/install-sh doc/install-sh: New files.
 
-2004-06-30  Zoltan Varga  <vargaz@freemail.hu>
-
-       * include/private/gc_priv.h (SMALL_OBJ): Add Hans' fix for crashes
-       seen on SPARC64.
-
 Thu Jun 24 15:39:00 CEST 2004 Paolo Molaro <lupus@ximian.com>
 
        * alloc.c: use Hans' fix for bug #59557.
index bdb299aa49aabd1873a69c08e326279ce93b5ef3..3df9aee1bf09faefbc62dccf63bea723059c79c9 100644 (file)
@@ -22,12 +22,7 @@ AUTOMAKE_OPTIONS = foreign
 
 SUBDIRS = include doc
 
-#
-# libtool is not capable of creating shared/static versions of a convenience
-# library, so we have to do it ourselves
-#
-
-noinst_LTLIBRARIES = libmonogc.la libmonogc-static.la
+noinst_LTLIBRARIES = libmonogc.la
 
 EXTRA_DIST = 
     ## more items will be succesively added below
@@ -59,10 +54,6 @@ EXTRA_libmonogc_la_SOURCES = alpha_mach_dep.S \
     rs6000_mach_dep.s sparc_mach_dep.S sparc_netbsd_mach_dep.s \
     sparc_sunos4_mach_dep.s ia64_save_regs_in_stack.s
 
-libmonogc_static_la_SOURCES = $(libmonogc_la_SOURCES)
-libmonogc_static_la_LIBADD = $(libmonogc_la_LIBADD)
-libmonogc_static_la_LDFLAGS = -static
-
 EXTRA_DIST += alpha_mach_dep.S mips_sgi_mach_dep.s sparc_mach_dep.S
 
 AM_CFLAGS = @GC_CFLAGS@
index 4f43aef9b413cf2e0f092b6318899d45d3aad876..38cacd8b7e322a2f8b8829e720a69f1b8fe39ce1 100644 (file)
@@ -72,7 +72,7 @@ case "$THREADS" in
     THREADS=posix
     THREADLIBS=-lpthread
     case "$host" in
-     x86-*-linux* | ia64-*-linux* | i586-*-linux* | i686-*-linux* | x86_64-*-linux* | alpha-*-linux* | s390*-*-linux*)
+     x86-*-linux* | ia64-*-linux* | i586-*-linux* | i686-*-linux* | x86_64-*-linux* | alpha-*-linux*)
        AC_DEFINE(GC_LINUX_THREADS)
        AC_DEFINE(_REENTRANT)
         if test "${enable_parallel_mark}" = yes; then
@@ -109,7 +109,7 @@ case "$THREADS" in
        if test "x$PTHREAD_LIBS" = "x"; then
                THREADLIBS=-pthread
        else
-               THREADLIBS=$PTHREAD_LIBS
+               THREADLIBS="$PTHREAD_LIBS"
        fi
        ;;
      *-*-freebsd5*)
index 16f51c1e128ae4807968da4b178ac7dccc2e5045..1874c7b6d209564102cf4cf0651c70ad36bbff1e 100644 (file)
  * These routines normally require an explicit call to GC_init(), though
  * that may be done from a constructor function.
  */
+
+#ifndef GC_LOCAL_ALLOC_H
+#define GC_LOCAL_ALLOC_H
+
 #ifndef _GC_H
 #   include "gc.h"
 #endif
@@ -46,9 +49,6 @@
 #   include "gc_gcj.h"
 #endif
 
-#ifndef GC_LOCAL_ALLOC_H
-#define GC_LOCAL_ALLOC_H
-
 /* We assume ANSI C for this interface.        */
 
 GC_PTR GC_local_malloc(size_t bytes);
@@ -58,8 +58,6 @@ GC_PTR GC_local_malloc_atomic(size_t bytes);
 #if defined(GC_GCJ_SUPPORT)
   GC_PTR GC_local_gcj_malloc(size_t bytes,
                             void * ptr_to_struct_containing_descr);
-  GC_PTR GC_local_gcj_fast_malloc(size_t lw,
-                            void * ptr_to_struct_containing_descr);
 #endif
 
 # ifdef GC_DEBUG
@@ -68,14 +66,12 @@ GC_PTR GC_local_malloc_atomic(size_t bytes);
 #   define GC_LOCAL_MALLOC_ATOMIC(s) GC_debug_malloc_atomic(s,GC_EXTRAS)
 #   ifdef GC_GCJ_SUPPORT
 #      define GC_LOCAL_GCJ_MALLOC(s,d) GC_debug_gcj_malloc(s,d,GC_EXTRAS)
-#      define GC_LOCAL_GCJ_FAST_MALLOC(s,d) GC_debug_gcj_fast_malloc(s,d,GC_EXTRAS)
 #   endif
 # else
 #   define GC_LOCAL_MALLOC(s) GC_local_malloc(s)
 #   define GC_LOCAL_MALLOC_ATOMIC(s) GC_local_malloc_atomic(s)
 #   ifdef GC_GCJ_SUPPORT
 #      define GC_LOCAL_GCJ_MALLOC(s,d) GC_local_gcj_malloc(s,d)
-#      define GC_LOCAL_GCJ_FAST_MALLOC(s,d) GC_local_gcj_fast_malloc(s,d)
 #   endif
 # endif
 
@@ -86,9 +82,7 @@ GC_PTR GC_local_malloc_atomic(size_t bytes);
 #   define GC_MALLOC_ATOMIC(s) GC_LOCAL_MALLOC_ATOMIC(s)
 #   ifdef GC_GCJ_SUPPORT
 #      undef GC_GCJ_MALLOC
-#      undef GC_GCJ_FAST_MALLOC
 #      define GC_GCJ_MALLOC(s,d) GC_LOCAL_GCJ_MALLOC(s,d)
-#      define GC_GCJ_FAST_MALLOC(s,d) GC_LOCAL_GCJ_FAST_MALLOC(s,d)
 #   endif
 # endif
 
index d5a24b4ceb7e8f7e640030ee4ff45ca91921a619..b9576912476218ad5e8bec089ff04d7a165f221e 100644 (file)
@@ -83,13 +83,12 @@ typedef char * ptr_t;       /* A generic pointer to which we can add        */
 #   define VOLATILE
 #endif
 
-#if defined(__GNUC__) && (__GNUC__ > 2) && defined(__OPTIMIZE__)
-/* This doesn't work in some earlier gcc versions */
+#if 0 /* defined(__GNUC__) doesn't work yet */
 # define EXPECT(expr, outcome) __builtin_expect(expr,outcome)
   /* Equivalent to (expr), but predict that usually (expr)==outcome. */
 #else
 # define EXPECT(expr, outcome) (expr)
-#endif
+#endif /* __GNUC__ */
 
 # ifndef GC_LOCKS_H
 #   include "gc_locks.h"
@@ -579,7 +578,7 @@ extern GC_warn_proc GC_current_warn_proc;
 # else
 #       define ALIGNED_WORDS(n) ROUNDED_UP_WORDS(n)
 # endif
-# define SMALL_OBJ(bytes) ((bytes) <= (MAXOBJBYTES - EXTRA_BYTES))
+# define SMALL_OBJ(bytes) ((bytes) < (MAXOBJBYTES - EXTRA_BYTES))
 # define ADD_SLOP(bytes) ((bytes) + EXTRA_BYTES)
 # ifndef MIN_WORDS
     /* MIN_WORDS is the size of the smallest allocated object. */
index b45341e21095cade2e1e622de3cdff7b334b3182..5bb157f8b3fcb41ffa3a9d863cd2f598ee2f41c7 100644 (file)
@@ -168,7 +168,6 @@ void GC_init_parallel();
 
 /* We don't really support thread-local allocation with DBG_HDRS_ALL */
 
-static
 #ifdef USE_COMPILER_TLS
   __thread
 #endif
@@ -393,47 +392,6 @@ GC_PTR GC_local_gcj_malloc(size_t bytes,
     }
 }
 
-/* Similar to GC_local_gcj_malloc, but the size is in words, and we don't      */
-/* adjust it.  The size is assumed to be such that it can be   */
-/* allocated as a small object.                                        */
-void * GC_local_gcj_fast_malloc(size_t lw, void * ptr_to_struct_containing_descr)
-{
-       ptr_t * my_fl = ((GC_thread)GC_getspecific(GC_thread_key))
-               -> gcj_freelists + lw;
-       ptr_t my_entry = *my_fl;
-
-    GC_ASSERT(GC_gcj_malloc_initialized);
-
-       if (EXPECT((word)my_entry >= HBLKSIZE, 1)) {
-           GC_PTR result = (GC_PTR)my_entry;
-           GC_ASSERT(!GC_incremental);
-           /* We assert that any concurrent marker will stop us.       */
-           /* Thus it is impossible for a mark procedure to see the    */
-           /* allocation of the next object, but to see this object    */
-           /* still containing a free list pointer.  Otherwise the     */
-           /* marker might find a random "mark descriptor".            */
-           *(volatile ptr_t *)my_fl = obj_link(my_entry);
-           /* We must update the freelist before we store the pointer. */
-           /* Otherwise a GC at this point would see a corrupted       */
-           /* free list.                                               */
-           /* A memory barrier is probably never needed, since the     */
-           /* action of stopping this thread will cause prior writes   */
-           /* to complete.                                             */
-           GC_ASSERT(((void * volatile *)result)[1] == 0); 
-           *(void * volatile *)result = ptr_to_struct_containing_descr; 
-           return result;
-       } else if ((word)my_entry - 1 < DIRECT_GRANULES) {
-           if (!GC_incremental) *my_fl = my_entry + lw + 1;
-               /* In the incremental case, we always have to take this */
-               /* path.  Thus we leave the counter alone.              */
-            return GC_gcj_fast_malloc(lw, ptr_to_struct_containing_descr);
-       } else {
-           GC_generic_malloc_many(BYTES_FROM_INDEX(lw), GC_gcj_kind, my_fl);
-           if (*my_fl == 0) return GC_oom_fn(BYTES_FROM_INDEX(lw));
-           return GC_local_gcj_fast_malloc(lw, ptr_to_struct_containing_descr);
-       }
-}
-
 #endif /* GC_GCJ_SUPPORT */
 
 # else  /* !THREAD_LOCAL_ALLOC  && !DBG_HDRS_ALL */