diff options
author | Thomas Fitzsimmons <fitzsim@redhat.com> | 2006-08-24 17:33:51 +0000 |
---|---|---|
committer | Thomas Fitzsimmons <fitzsim@redhat.com> | 2006-08-24 17:33:51 +0000 |
commit | 68dbbc7ff521a142be56872f529e397b9fc52236 (patch) | |
tree | 7393aa52e26800c0e00cdf0f152f5978e3ac5382 | |
parent | 4baea5c79d34d9af6de571a7510a525363344e1d (diff) |
* Merge remaining boehm-gc differences from trunk.
git-svn-id: https://gcc.gnu.org/svn/gcc/branches/redhat/gcc-4_1-branch-java-merge-20060823@116382 138bc75d-0d04-0410-961f-82ee72b054a4
-rwxr-xr-x | boehm-gc/configure | 23 | ||||
-rw-r--r-- | boehm-gc/configure.ac | 19 | ||||
-rw-r--r-- | boehm-gc/include/gc_config.h.in | 3 | ||||
-rw-r--r-- | boehm-gc/include/gc_pthread_redirects.h | 2 | ||||
-rw-r--r-- | boehm-gc/pthread_support.c | 33 |
5 files changed, 2 insertions, 78 deletions
diff --git a/boehm-gc/configure b/boehm-gc/configure index ce1882eb752..3f2f5d835f5 100755 --- a/boehm-gc/configure +++ b/boehm-gc/configure @@ -7426,29 +7426,6 @@ _ACEOF fi -symver= -case "$target" in - *-*-linux* ) - cat > conftest.c <<EOF -#include <pthread.h> -void *tf (void *arg) { (void) arg; return NULL; } -int main (void) { pthread_t th; pthread_create (&th, NULL, tf, NULL); return 0; } -EOF - if $CC $CFLAGS -pthread -o conftest conftest.c > /dev/null 2>&1; then - symver=`readelf -s conftest 2> /dev/null | sed -n '/UND pthread_create@/{s/^.*@//;s/ .*$//;p;q}'` - fi - rm -f conftest conftest.c - ;; -esac -if test -n "$symver"; then - -cat >>confdefs.h <<_ACEOF -#define GC_PTHREAD_SYM_VERSION "$symver" -_ACEOF - -fi - - if test -n "$with_cross_host" && test x"$with_cross_host" != x"no"; then toolexecdir='$(exec_prefix)/$(target_noncanonical)' diff --git a/boehm-gc/configure.ac b/boehm-gc/configure.ac index 8fdf4a03144..807b7a1a758 100644 --- a/boehm-gc/configure.ac +++ b/boehm-gc/configure.ac @@ -495,25 +495,6 @@ if test "${gc_use_mmap}" = "yes"; then AC_DEFINE(USE_MMAP, 1, [use MMAP instead of sbrk to get new memory]) fi -symver= -case "$target" in - *-*-linux* ) - cat > conftest.c <<EOF -#include <pthread.h> -void *tf (void *arg) { (void) arg; return NULL; } -int main (void) { pthread_t th; pthread_create (&th, NULL, tf, NULL); return 0; } -EOF - if $CC $CFLAGS -pthread -o conftest conftest.c > /dev/null 2>&1; then - symver=`readelf -s conftest 2> /dev/null | sed -n '/UND pthread_create@/{s/^.*@//;s/ .*$//;p;q}'` - fi - rm -f conftest conftest.c - ;; -esac -if test -n "$symver"; then - AC_DEFINE_UNQUOTED(GC_PTHREAD_SYM_VERSION, "$symver", [symbol version of pthread_create]) -fi - - if test -n "$with_cross_host" && test x"$with_cross_host" != x"no"; then toolexecdir='$(exec_prefix)/$(target_noncanonical)' diff --git a/boehm-gc/include/gc_config.h.in b/boehm-gc/include/gc_config.h.in index e8924c57986..5055b502459 100644 --- a/boehm-gc/include/gc_config.h.in +++ b/boehm-gc/include/gc_config.h.in @@ -45,9 +45,6 @@ /* support for Tru64 pthreads */ #undef GC_OSF1_THREADS -/* symbol version of pthread_create */ -#undef GC_PTHREAD_SYM_VERSION - /* support for Solaris pthreads */ #undef GC_SOLARIS_PTHREADS diff --git a/boehm-gc/include/gc_pthread_redirects.h b/boehm-gc/include/gc_pthread_redirects.h index f9d4939affc..842518cfcc4 100644 --- a/boehm-gc/include/gc_pthread_redirects.h +++ b/boehm-gc/include/gc_pthread_redirects.h @@ -68,9 +68,7 @@ # undef pthread_detach #endif -#ifndef GC_PTHREAD_SYM_VERSION # define pthread_create GC_pthread_create -#endif # define pthread_join GC_pthread_join # define pthread_detach GC_pthread_detach diff --git a/boehm-gc/pthread_support.c b/boehm-gc/pthread_support.c index bb5ba707685..bbda8522c03 100644 --- a/boehm-gc/pthread_support.c +++ b/boehm-gc/pthread_support.c @@ -1303,37 +1303,8 @@ void * GC_start_routine(void * arg) return(result); } -#ifdef GC_PTHREAD_SYM_VERSION - -/* Force constr to execute prior to main(). */ -static void constr (void) __attribute__ ((constructor)); - -static int -(*pthread_create_)(pthread_t *new_thread, - const pthread_attr_t *attr_in, - void * (*thread_execp)(void *), void *arg); - -static void -constr (void) -{ - /* Get a pointer to the real pthread_create. */ - pthread_create_ = dlvsym (RTLD_NEXT, "pthread_create", - GC_PTHREAD_SYM_VERSION); -} - -#define GC_PTHREAD_CREATE_NAME pthread_create -#define GC_PTHREAD_REAL_NAME (*pthread_create_) - -#else - -#define GC_PTHREAD_CREATE_NAME WRAP_FUNC(pthread_create) -#define GC_PTHREAD_REAL_NAME REAL_FUNC(pthread_create) - -#endif - - int -GC_PTHREAD_CREATE_NAME(pthread_t *new_thread, +WRAP_FUNC(pthread_create)(pthread_t *new_thread, const pthread_attr_t *attr, void *(*start_routine)(void *), void *arg) { @@ -1394,7 +1365,7 @@ GC_PTHREAD_CREATE_NAME(pthread_t *new_thread, pthread_self()); # endif - result = GC_PTHREAD_REAL_NAME(new_thread, attr, GC_start_routine, si); + result = REAL_FUNC(pthread_create)(new_thread, attr, GC_start_routine, si); # ifdef DEBUG_THREADS GC_printf1("Started thread 0x%X\n", *new_thread); |