+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>
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
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
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
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
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
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
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
/* 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. */