summaryrefslogtreecommitdiff
path: root/boehm-gc
diff options
context:
space:
mode:
authorljrittle <ljrittle@138bc75d-0d04-0410-961f-82ee72b054a4>2001-11-26 17:40:34 +0000
committerljrittle <ljrittle@138bc75d-0d04-0410-961f-82ee72b054a4>2001-11-26 17:40:34 +0000
commit38100f51f3b2e49a169d8ab82db1ffbab8260ff8 (patch)
tree1cfc8f6bed312181086a11d15a92ce156da4e363 /boehm-gc
parent70ba1b368c187c882ee2f22391c7ecf70387b575 (diff)
downloadgcc-38100f51f3b2e49a169d8ab82db1ffbab8260ff8.tar.gz
* linux_threads.c (WRAP_FUNC(pthread_join)): Remove special
case for GC_FREEBSD_THREADS. * configure.in (*-*-freebsd*): Clarify warning. * configure: Rebuilt. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@47347 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'boehm-gc')
-rw-r--r--boehm-gc/ChangeLog7
-rwxr-xr-xboehm-gc/configure13
-rw-r--r--boehm-gc/configure.in3
-rw-r--r--boehm-gc/linux_threads.c11
4 files changed, 16 insertions, 18 deletions
diff --git a/boehm-gc/ChangeLog b/boehm-gc/ChangeLog
index aefe87faa82..234d9df973e 100644
--- a/boehm-gc/ChangeLog
+++ b/boehm-gc/ChangeLog
@@ -1,3 +1,10 @@
+2001-11-26 Loren J. Rittle <ljrittle@acm.org>
+
+ * linux_threads.c (WRAP_FUNC(pthread_join)): Remove special
+ case for GC_FREEBSD_THREADS.
+ * configure.in (*-*-freebsd*): Clarify warning.
+ * configure: Rebuilt.
+
2001-10-23 Loren J. Rittle <ljrittle@acm.org>
Andreas Tobler <toa@pop.agri.ch>
diff --git a/boehm-gc/configure b/boehm-gc/configure
index 6a823926668..a9257f3050d 100755
--- a/boehm-gc/configure
+++ b/boehm-gc/configure
@@ -1540,7 +1540,7 @@ else
if { (eval echo configure:1541: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then
for file in conftest.*; do
case $file in
- *.c | *.o | *.obj) ;;
+ *.c | *.C | *.o | *.obj) ;;
*) ac_cv_exeext=`echo $file | sed -e s/conftest//` ;;
esac
done
@@ -2591,7 +2591,7 @@ else
if { (eval echo configure:2592: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then
for file in conftest.*; do
case $file in
- *.c | *.o | *.obj) ;;
+ *.c | *.C | *.o | *.obj) ;;
*) ac_cv_exeext=`echo $file | sed -e s/conftest//` ;;
esac
done
@@ -2693,7 +2693,8 @@ EOF
THREADLIBS="-lpthread -lrt"
;;
*-*-freebsd*)
- echo "configure: warning: "FreeBSD does not yet fully support threads with Boehm GC."" 1>&2
+ echo "configure: warning: "Threaded GC is prone to deadlock before FreeBSD 4.5."" 1>&2
+ echo "configure: warning: "Related symptom is pthread_join returns spurious EINTR."" 1>&2
cat >> confdefs.h <<\EOF
#define GC_FREEBSD_THREADS 1
EOF
@@ -2732,7 +2733,7 @@ esac
echo $ac_n "checking for dlopen in -ldl""... $ac_c" 1>&6
-echo "configure:2736: checking for dlopen in -ldl" >&5
+echo "configure:2737: checking for dlopen in -ldl" >&5
ac_lib_var=`echo dl'_'dlopen | sed 'y%./+-%__p_%'`
if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
@@ -2740,7 +2741,7 @@ else
ac_save_LIBS="$LIBS"
LIBS="-ldl $LIBS"
cat > conftest.$ac_ext <<EOF
-#line 2744 "configure"
+#line 2745 "configure"
#include "confdefs.h"
/* Override any gcc2 internal prototype to avoid an error. */
/* We use char because int might match the return type of a gcc2
@@ -2751,7 +2752,7 @@ int main() {
dlopen()
; return 0; }
EOF
-if { (eval echo configure:2755: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:2756: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
eval "ac_cv_lib_$ac_lib_var=yes"
else
diff --git a/boehm-gc/configure.in b/boehm-gc/configure.in
index ce6b7250c70..219af7f6311 100644
--- a/boehm-gc/configure.in
+++ b/boehm-gc/configure.in
@@ -90,7 +90,8 @@ case "$THREADS" in
THREADLIBS="-lpthread -lrt"
;;
*-*-freebsd*)
- AC_MSG_WARN("FreeBSD does not yet fully support threads with Boehm GC.")
+ AC_MSG_WARN("Threaded GC is prone to deadlock before FreeBSD 4.5.")
+ AC_MSG_WARN("Related symptom is pthread_join returns spurious EINTR.")
AC_DEFINE(GC_FREEBSD_THREADS)
INCLUDES="$INCLUDES -pthread"
THREADLIBS=-pthread
diff --git a/boehm-gc/linux_threads.c b/boehm-gc/linux_threads.c
index b26988cef9e..c4a2b89a18d 100644
--- a/boehm-gc/linux_threads.c
+++ b/boehm-gc/linux_threads.c
@@ -1268,17 +1268,6 @@ int WRAP_FUNC(pthread_join)(pthread_t thread, void **retval)
/* cant have been recycled by pthreads. */
UNLOCK();
result = REAL_FUNC(pthread_join)(thread, retval);
-# if defined (GC_FREEBSD_THREADS)
- /* On FreeBSD, the wrapped pthread_join() sometimes returns (what
- appears to be) a spurious EINTR which caused the test and real code
- to gratuitously fail. Having looked at system pthread library source
- code, I see how this return code may be generated. In one path of
- code, pthread_join() just returns the errno setting of the thread
- being joined. This does not match the POSIX specification or the
- local man pages thus I have taken the liberty to catch this one
- spurious return value properly conditionalized on GC_FREEBSD_THREADS. */
- if (result == EINTR) result = 0;
-# endif
if (result == 0) {
LOCK();
/* Here the pthread thread id may have been recycled. */