Skip to content

Commit

Permalink
gc6.8 tarball import
Browse files Browse the repository at this point in the history
  • Loading branch information
ivmai committed Jul 26, 2011
1 parent e68119e commit bf7cccc
Show file tree
Hide file tree
Showing 13 changed files with 212 additions and 50 deletions.
44 changes: 27 additions & 17 deletions configure
@@ -1,7 +1,7 @@
#! /bin/sh
# From configure.in Revision: 1.2 .
# Guess values for system-dependent variables and create Makefiles.
# Generated by GNU Autoconf 2.59 for gc 6.7.
# Generated by GNU Autoconf 2.59 for gc 6.8.
#
# Report bugs to <Hans.Boehm@hp.com>.
#
Expand Down Expand Up @@ -429,8 +429,8 @@ SHELL=${CONFIG_SHELL-/bin/sh}
# Identity of this package.
PACKAGE_NAME='gc'
PACKAGE_TARNAME='gc'
PACKAGE_VERSION='6.7'
PACKAGE_STRING='gc 6.7'
PACKAGE_VERSION='6.8'
PACKAGE_STRING='gc 6.8'
PACKAGE_BUGREPORT='Hans.Boehm@hp.com'

ac_unique_file="gcj_mlc.c"
Expand Down Expand Up @@ -956,7 +956,7 @@ if test "$ac_init_help" = "long"; then
# Omit some internal or obsolete options to make the list less imposing.
# This message is too long to be a string in the A/UX 3.1 sh.
cat <<_ACEOF
\`configure' configures gc 6.7 to adapt to many kinds of systems.
\`configure' configures gc 6.8 to adapt to many kinds of systems.
Usage: $0 [OPTION]... [VAR=VALUE]...
Expand Down Expand Up @@ -1023,7 +1023,7 @@ fi

if test -n "$ac_init_help"; then
case $ac_init_help in
short | recursive ) echo "Configuration of gc 6.7:";;
short | recursive ) echo "Configuration of gc 6.8:";;
esac
cat <<\_ACEOF
Expand Down Expand Up @@ -1167,7 +1167,7 @@ fi
test -n "$ac_init_help" && exit 0
if $ac_init_version; then
cat <<\_ACEOF
gc configure 6.7
gc configure 6.8
generated by GNU Autoconf 2.59
Copyright (C) 2003 Free Software Foundation, Inc.
Expand All @@ -1181,7 +1181,7 @@ cat >&5 <<_ACEOF
This file contains any messages produced by compilers while
running configure, to aid debugging if configure makes a mistake.
It was created by gc $as_me 6.7, which was
It was created by gc $as_me 6.8, which was
generated by GNU Autoconf 2.59. Invocation command line was
$ $0 $@
Expand Down Expand Up @@ -1953,7 +1953,7 @@ fi
# Define the identity of the package.
PACKAGE='gc'
VERSION='6.7'
VERSION='6.8'
cat >>confdefs.h <<_ACEOF
Expand Down Expand Up @@ -4008,9 +4008,9 @@ _ACEOF
_ACEOF
;;
*-*-hpux*)
{ echo "$as_me:$LINENO: WARNING: \"Only HP/UX 11 threads are supported.\"" >&5
echo "$as_me: WARNING: \"Only HP/UX 11 threads are supported.\"" >&2;}
*-*-hpux11*)
{ echo "$as_me:$LINENO: WARNING: \"Only HP-UX 11 POSIX threads are supported.\"" >&5
echo "$as_me: WARNING: \"Only HP-UX 11 POSIX threads are supported.\"" >&2;}
cat >>confdefs.h <<\_ACEOF
#define GC_HPUX_THREADS 1
_ACEOF
Expand All @@ -4030,6 +4030,16 @@ _ACEOF
_ACEOF
THREADDLLIBS="-lpthread -lrt"
# HPUX needs REENTRANT for the _r calls.
cat >>confdefs.h <<\_ACEOF
#define _REENTRANT 1
_ACEOF
;;
*-*-hpux10*)
{ echo "$as_me:$LINENO: WARNING: \"Only HP-UX 11 POSIX threads are supported.\"" >&5
echo "$as_me: WARNING: \"Only HP-UX 11 POSIX threads are supported.\"" >&2;}
;;
*-*-freebsd*)
{ echo "$as_me:$LINENO: WARNING: \"FreeBSD does not yet fully support threads with Boehm GC.\"" >&5
Expand Down Expand Up @@ -6069,7 +6079,7 @@ test "x$enable_libtool_lock" != xno && enable_libtool_lock=yes
case $host in
*-*-irix6*)
# Find out which ABI we are using.
echo '#line 6072 "configure"' > conftest.$ac_ext
echo '#line 6082 "configure"' > conftest.$ac_ext
if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
(eval $ac_compile) 2>&5
ac_status=$?
Expand Down Expand Up @@ -6642,7 +6652,7 @@ chmod -w .
save_CFLAGS="$CFLAGS"
CFLAGS="$CFLAGS -o out/conftest2.$ac_objext"
compiler_c_o=no
if { (eval echo configure:6645: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>out/conftest.err; } && test -s out/conftest2.$ac_objext; then
if { (eval echo configure:6655: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>out/conftest.err; } && test -s out/conftest2.$ac_objext; then
# The compiler can only warn and ignore the option if not recognized
# So say no if there are warnings
if test -s out/conftest.err; then
Expand Down Expand Up @@ -8569,7 +8579,7 @@ else
lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
lt_status=$lt_dlunknown
cat > conftest.$ac_ext <<EOF
#line 8572 "configure"
#line 8582 "configure"
#include "confdefs.h"
#if HAVE_DLFCN_H
Expand Down Expand Up @@ -8667,7 +8677,7 @@ else
lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
lt_status=$lt_dlunknown
cat > conftest.$ac_ext <<EOF
#line 8670 "configure"
#line 8680 "configure"
#include "confdefs.h"
#if HAVE_DLFCN_H
Expand Down Expand Up @@ -10289,7 +10299,7 @@ _ASBOX
} >&5
cat >&5 <<_CSEOF
This file was extended by gc $as_me 6.7, which was
This file was extended by gc $as_me 6.8, which was
generated by GNU Autoconf 2.59. Invocation command line was
CONFIG_FILES = $CONFIG_FILES
Expand Down Expand Up @@ -10347,7 +10357,7 @@ _ACEOF
cat >>$CONFIG_STATUS <<_ACEOF
ac_cs_version="\\
gc config.status 6.7
gc config.status 6.8
configured by $0, generated by GNU Autoconf 2.59,
with options \\"`echo "$ac_configure_args" | sed 's/[\\""\`\$]/\\\\&/g'`\\"
Expand Down
22 changes: 19 additions & 3 deletions configure.in
Expand Up @@ -17,7 +17,7 @@ dnl Process this file with autoconf to produce configure.
# Initialization
# ==============

AC_INIT(gc,6.7,Hans.Boehm@hp.com)
AC_INIT(gc,6.8,Hans.Boehm@hp.com)
## version must conform to [0-9]+[.][0-9]+(alpha[0-9]+)?
AC_CONFIG_SRCDIR(gcj_mlc.c)
AC_CANONICAL_TARGET
Expand Down Expand Up @@ -94,22 +94,38 @@ case "$THREADS" in
AC_DEFINE(GC_AIX_THREADS)
AC_DEFINE(_REENTRANT)
;;
*-*-hpux*)
AC_MSG_WARN("Only HP/UX 11 threads are supported.")
*-*-hpux11*)
AC_MSG_WARN("Only HP-UX 11 POSIX threads are supported.")
AC_DEFINE(GC_HPUX_THREADS)
AC_DEFINE(_POSIX_C_SOURCE,199506L)
if test "${enable_parallel_mark}" = yes; then
AC_DEFINE(PARALLEL_MARK)
fi
AC_DEFINE(THREAD_LOCAL_ALLOC)
THREADDLLIBS="-lpthread -lrt"
# HPUX needs REENTRANT for the _r calls.
AC_DEFINE(_REENTRANT, 1, [Required define if using POSIX threads])
;;
*-*-hpux10*)
AC_MSG_WARN("Only HP-UX 11 POSIX threads are supported.")
;;
*-*-freebsd*)
AC_MSG_WARN("FreeBSD does not yet fully support threads with Boehm GC.")
AC_DEFINE(GC_FREEBSD_THREADS)
INCLUDES="$INCLUDES -pthread"
THREADDLLIBS=-pthread
;;
*-*-kfreebsd*-gnu)
AC_DEFINE(GC_FREEBSD_THREADS)
INCLUDES="$INCLUDES -pthread"
THREADDLLIBS=-pthread
AC_DEFINE(_REENTRANT)
if test "${enable_parallel_mark}" = yes; then
AC_DEFINE(PARALLEL_MARK)
fi
AC_DEFINE(THREAD_LOCAL_ALLOC)
AC_DEFINE(USE_COMPILER_TLS)
;;
*-*-netbsd*)
AC_MSG_WARN("Only on NetBSD 2.0 or later.")
AC_DEFINE(GC_NETBSD_THREADS)
Expand Down
33 changes: 27 additions & 6 deletions darwin_stop_world.c
Expand Up @@ -169,6 +169,7 @@ void GC_push_all_stacks() {

void GC_push_all_stacks() {
int i;
task_t my_task;
kern_return_t r;
mach_port_t me;
ptr_t lo, hi;
Expand All @@ -178,7 +179,8 @@ void GC_push_all_stacks() {
me = mach_thread_self();
if (!GC_thr_initialized) GC_thr_init();

r = task_threads(current_task(), &act_list, &listcount);
my_task = current_task();
r = task_threads(my_task, &act_list, &listcount);
if(r != KERN_SUCCESS) ABORT("task_threads failed");
for(i = 0; i < listcount; i++) {
thread_act_t thread = act_list[i];
Expand Down Expand Up @@ -268,8 +270,10 @@ void GC_push_all_stacks() {
);
# endif
GC_push_all_stack(lo, hi);
mach_port_deallocate(my_task, thread);
} /* for(p=GC_threads[i]...) */
vm_deallocate(current_task(), (vm_address_t)act_list, sizeof(thread_t) * listcount);
vm_deallocate(my_task, (vm_address_t)act_list, sizeof(thread_t) * listcount);
mach_port_deallocate(my_task, me);
}
#endif /* !DARWIN_DONT_PARSE_STACK */

Expand Down Expand Up @@ -363,6 +367,7 @@ int GC_suspend_thread_list(thread_act_array_t act_list, int count,
}
if (!found) GC_mach_threads_count++;
}
mach_port_deallocate(current_task(), my_thread);
return changed;
}

Expand All @@ -372,6 +377,7 @@ void GC_stop_world()
{
int i, changes;
GC_thread p;
task_t my_task = current_task();
mach_port_t my_thread = mach_thread_self();
kern_return_t kern_result;
thread_act_array_t act_list, prev_list;
Expand Down Expand Up @@ -407,13 +413,21 @@ void GC_stop_world()
prevcount = 0;
do {
int result;
kern_result = task_threads(current_task(), &act_list, &listcount);
kern_result = task_threads(my_task, &act_list, &listcount);
result = GC_suspend_thread_list(act_list, listcount,
prev_list, prevcount);
changes = result;
prev_list = act_list;
prevcount = listcount;
vm_deallocate(current_task(), (vm_address_t)act_list, sizeof(thread_t) * listcount);

if(kern_result == KERN_SUCCESS) {
int i;

for(i = 0; i < listcount; i++)
mach_port_deallocate(my_task, act_list[i]);

vm_deallocate(my_task, (vm_address_t)act_list, sizeof(thread_t) * listcount);
}
} while (changes);


Expand All @@ -430,12 +444,15 @@ void GC_stop_world()
#if DEBUG_THREADS
GC_printf1("World stopped from 0x%lx\n", my_thread);
#endif

mach_port_deallocate(my_task, my_thread);
}

/* Caller holds allocation lock, and has held it continuously since */
/* the world stopped. */
void GC_start_world()
{
task_t my_task = current_task();
mach_port_t my_thread = mach_thread_self();
int i, j;
GC_thread p;
Expand All @@ -456,7 +473,7 @@ void GC_start_world()
}
# endif

kern_result = task_threads(current_task(), &act_list, &listcount);
kern_result = task_threads(my_task, &act_list, &listcount);
for(i = 0; i < listcount; i++) {
thread_act_t thread = act_list[i];
if (thread != my_thread &&
Expand Down Expand Up @@ -484,8 +501,12 @@ void GC_start_world()
}
}
}

mach_port_deallocate(my_task, thread);
}
vm_deallocate(current_task(), (vm_address_t)act_list, sizeof(thread_t) * listcount);
vm_deallocate(my_task, (vm_address_t)act_list, sizeof(thread_t) * listcount);

mach_port_deallocate(my_task, my_thread);
# if DEBUG_THREADS
GC_printf0("World started\n");
# endif
Expand Down
2 changes: 1 addition & 1 deletion doc/README
Expand Up @@ -28,7 +28,7 @@ are GPL'ed, but with an exception that should cover all uses in the
collector. (If you are concerned about such things, I recommend you look
at the notice in config.guess or ltmain.sh.)

This is version 6.7 of a conservative garbage collector for C and C++.
This is version 6.8 of a conservative garbage collector for C and C++.

You might find a more recent version of this at

Expand Down
16 changes: 16 additions & 0 deletions doc/README.changes
Expand Up @@ -2284,6 +2284,22 @@ Since 6.6:
- Fix Makefile.am, so it handles exe extensions under Cygwin correctly
for gctest.

Since 6.7:
- Added some support for Dragonfly BSD. (Thanks to Joerg Sonnenberger and
Thomas Klausner.)
- Improvements to the HP/UX section of configure.in.
(Thanks to Andreas Tobler.)
- GC_unix_get_mem could neglect to release the malloc lock on Irix, under
extremely unlikely circumstances. Thanks to Jean-Baptiste Nivois for
some careful code reading.
- Added support for kFreeBSD + glibc (Thanks to Petr Salinger)
- Fix more MacOS threads memory leaks (Thanks to Allan Hsu)
- Added initial Solaris/X86-64 support (Thanks to Rainer Orth)
- Applied a long-lost MINGW patch from Gerard Allan for malloc redirection
with threads. This one probably makes no sense for 7.0, and was not applied
there.
- The Solaris/SPARC definition of GC_INIT() in gc.h wasn't C++-compilable.

To do:
- The USE_MUNMAP code should really use a separate data structure
indexed by physical page to keep track of time since last use of
Expand Down
4 changes: 2 additions & 2 deletions dyn_load.c
Expand Up @@ -26,7 +26,7 @@
* None of this is safe with dlclose and incremental collection.
* But then not much of anything is safe in the presence of dlclose.
*/
#if defined(__linux__) && !defined(_GNU_SOURCE)
#if (defined(__linux__) || defined(__GLIBC__)) && !defined(_GNU_SOURCE)
/* Can't test LINUX, since this must be define before other includes */
# define _GNU_SOURCE
#endif
Expand Down Expand Up @@ -381,7 +381,7 @@ GC_bool GC_register_main_static_data()
/* For glibc 2.2.4+. Unfortunately, it doesn't work for older */
/* versions. Thanks to Jakub Jelinek for most of the code. */

# if defined(LINUX) /* Are others OK here, too? */ \
# if (defined(LINUX) || defined (__GLIBC__)) /* Are others OK here, too? */ \
&& (__GLIBC__ > 2 || (__GLIBC__ == 2 && __GLIBC_MINOR__ > 2) \
|| (__GLIBC__ == 2 && __GLIBC_MINOR__ == 2 && defined(DT_CONFIG)))

Expand Down

0 comments on commit bf7cccc

Please sign in to comment.