Bug 430884: removed the obsolete implementation based on Solaris threads.

Contributed by Julien Pierre <julien.pierre.boogz@sun.com>.  r=wtc.
Modified Files:
	configure configure.in lib/msgc/tests/Makefile.in
	lib/prstreams/tests/testprstrm/Makefile.in
	lib/tests/Makefile.in pr/include/md/_solaris.h
	pr/src/Makefile.in pr/src/cplus/tests/Makefile.in
	pr/src/md/unix/solaris.c pr/tests/Makefile.in
	pr/tests/foreign.c pr/tests/provider.c tools/Makefile.in
Removed Files:
	pr/src/md/unix/os_SunOS.s


git-svn-id: svn://10.0.0.236/trunk@251126 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
wtc%google.com 2008-05-03 13:41:41 +00:00
parent d43d3cb3af
commit 8a19b2f49a
14 changed files with 122 additions and 1375 deletions

View File

@ -63,9 +63,6 @@ ac_help="$ac_help
ac_help="$ac_help
--with-bthreads Use system bthreads library as thread subsystem
(BeOS only)"
ac_help="$ac_help
--with-native-threads Use native system threads as thread subsystem
(Solaris only)"
ac_help="$ac_help
--enable-ipv6 Compile ipv6 support"
ac_help="$ac_help
@ -628,7 +625,7 @@ else { echo "configure: error: can not run $ac_config_sub" 1>&2; exit 1; }
fi
echo $ac_n "checking host system type""... $ac_c" 1>&6
echo "configure:632: checking host system type" >&5
echo "configure:629: checking host system type" >&5
host_alias=$host
case "$host_alias" in
@ -649,7 +646,7 @@ host_os=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
echo "$ac_t""$host" 1>&6
echo $ac_n "checking target system type""... $ac_c" 1>&6
echo "configure:653: checking target system type" >&5
echo "configure:650: checking target system type" >&5
target_alias=$target
case "$target_alias" in
@ -667,7 +664,7 @@ target_os=`echo $target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
echo "$ac_t""$target" 1>&6
echo $ac_n "checking build system type""... $ac_c" 1>&6
echo "configure:671: checking build system type" >&5
echo "configure:668: checking build system type" >&5
build_alias=$build
case "$build_alias" in
@ -739,7 +736,7 @@ do
# Extract the first word of "$ac_prog", so it can be a program name with args.
set dummy $ac_prog; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
echo "configure:743: checking for $ac_word" >&5
echo "configure:740: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@ -1067,7 +1064,7 @@ if test -z "$SKIP_PATH_CHECKS"; then
# Extract the first word of "$WHOAMI whoami", so it can be a program name with args.
set dummy $WHOAMI whoami; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
echo "configure:1071: checking for $ac_word" >&5
echo "configure:1068: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_path_WHOAMI'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@ -1138,13 +1135,13 @@ if test "$target" != "$host"; then
_SAVE_LDFLAGS="$LDFLAGS"
echo $ac_n "checking for $host compiler""... $ac_c" 1>&6
echo "configure:1142: checking for $host compiler" >&5
echo "configure:1139: checking for $host compiler" >&5
for ac_prog in $HOST_CC gcc cc /usr/ucb/cc
do
# Extract the first word of "$ac_prog", so it can be a program name with args.
set dummy $ac_prog; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
echo "configure:1148: checking for $ac_word" >&5
echo "configure:1145: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_prog_HOST_CC'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@ -1190,16 +1187,16 @@ test -n "$HOST_CC" || HOST_CC=""""
LDFLAGS="$HOST_LDFLAGS"
echo $ac_n "checking whether the $host compiler ($HOST_CC $HOST_CFLAGS $HOST_LDFLAGS) works""... $ac_c" 1>&6
echo "configure:1194: checking whether the $host compiler ($HOST_CC $HOST_CFLAGS $HOST_LDFLAGS) works" >&5
echo "configure:1191: checking whether the $host compiler ($HOST_CC $HOST_CFLAGS $HOST_LDFLAGS) works" >&5
cat > conftest.$ac_ext <<EOF
#line 1196 "configure"
#line 1193 "configure"
#include "confdefs.h"
int main() {
return(0);
; return 0; }
EOF
if { (eval echo configure:1203: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
if { (eval echo configure:1200: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
ac_cv_prog_host_cc_works=1 echo "$ac_t""yes" 1>&6
else
@ -1228,7 +1225,7 @@ do
# Extract the first word of "$ac_prog", so it can be a program name with args.
set dummy $ac_prog; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
echo "configure:1232: checking for $ac_word" >&5
echo "configure:1229: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@ -1262,7 +1259,7 @@ test -n "$CC" || CC="echo"
# Extract the first word of "gcc", so it can be a program name with args.
set dummy gcc; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
echo "configure:1266: checking for $ac_word" >&5
echo "configure:1263: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@ -1292,7 +1289,7 @@ if test -z "$CC"; then
# Extract the first word of "cc", so it can be a program name with args.
set dummy cc; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
echo "configure:1296: checking for $ac_word" >&5
echo "configure:1293: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@ -1343,7 +1340,7 @@ fi
# Extract the first word of "cl", so it can be a program name with args.
set dummy cl; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
echo "configure:1347: checking for $ac_word" >&5
echo "configure:1344: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@ -1375,7 +1372,7 @@ fi
fi
echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works""... $ac_c" 1>&6
echo "configure:1379: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5
echo "configure:1376: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5
ac_ext=c
# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
@ -1386,12 +1383,12 @@ cross_compiling=$ac_cv_prog_cc_cross
cat > conftest.$ac_ext << EOF
#line 1390 "configure"
#line 1387 "configure"
#include "confdefs.h"
main(){return(0);}
EOF
if { (eval echo configure:1395: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
if { (eval echo configure:1392: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
ac_cv_prog_cc_works=yes
# If we can't run a trivial program, we are probably using a cross compiler.
if (./conftest; exit) 2>/dev/null; then
@ -1417,12 +1414,12 @@ if test $ac_cv_prog_cc_works = no; then
{ echo "configure: error: installation or configuration problem: C compiler cannot create executables." 1>&2; exit 1; }
fi
echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6
echo "configure:1421: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5
echo "configure:1418: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5
echo "$ac_t""$ac_cv_prog_cc_cross" 1>&6
cross_compiling=$ac_cv_prog_cc_cross
echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6
echo "configure:1426: checking whether we are using GNU C" >&5
echo "configure:1423: checking whether we are using GNU C" >&5
if eval "test \"`echo '$''{'ac_cv_prog_gcc'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@ -1431,7 +1428,7 @@ else
yes;
#endif
EOF
if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:1435: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:1432: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
ac_cv_prog_gcc=yes
else
ac_cv_prog_gcc=no
@ -1450,7 +1447,7 @@ ac_test_CFLAGS="${CFLAGS+set}"
ac_save_CFLAGS="$CFLAGS"
CFLAGS=
echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6
echo "configure:1454: checking whether ${CC-cc} accepts -g" >&5
echo "configure:1451: checking whether ${CC-cc} accepts -g" >&5
if eval "test \"`echo '$''{'ac_cv_prog_cc_g'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@ -1487,7 +1484,7 @@ do
# Extract the first word of "$ac_prog", so it can be a program name with args.
set dummy $ac_prog; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
echo "configure:1491: checking for $ac_word" >&5
echo "configure:1488: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_prog_CXX'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@ -1523,7 +1520,7 @@ do
# Extract the first word of "$ac_prog", so it can be a program name with args.
set dummy $ac_prog; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
echo "configure:1527: checking for $ac_word" >&5
echo "configure:1524: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_prog_CXX'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@ -1555,7 +1552,7 @@ test -n "$CXX" || CXX="gcc"
echo $ac_n "checking whether the C++ compiler ($CXX $CXXFLAGS $LDFLAGS) works""... $ac_c" 1>&6
echo "configure:1559: checking whether the C++ compiler ($CXX $CXXFLAGS $LDFLAGS) works" >&5
echo "configure:1556: checking whether the C++ compiler ($CXX $CXXFLAGS $LDFLAGS) works" >&5
ac_ext=C
# CXXFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
@ -1566,12 +1563,12 @@ cross_compiling=$ac_cv_prog_cxx_cross
cat > conftest.$ac_ext << EOF
#line 1570 "configure"
#line 1567 "configure"
#include "confdefs.h"
int main(){return(0);}
EOF
if { (eval echo configure:1575: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
if { (eval echo configure:1572: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
ac_cv_prog_cxx_works=yes
# If we can't run a trivial program, we are probably using a cross compiler.
if (./conftest; exit) 2>/dev/null; then
@ -1597,12 +1594,12 @@ if test $ac_cv_prog_cxx_works = no; then
{ echo "configure: error: installation or configuration problem: C++ compiler cannot create executables." 1>&2; exit 1; }
fi
echo $ac_n "checking whether the C++ compiler ($CXX $CXXFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6
echo "configure:1601: checking whether the C++ compiler ($CXX $CXXFLAGS $LDFLAGS) is a cross-compiler" >&5
echo "configure:1598: checking whether the C++ compiler ($CXX $CXXFLAGS $LDFLAGS) is a cross-compiler" >&5
echo "$ac_t""$ac_cv_prog_cxx_cross" 1>&6
cross_compiling=$ac_cv_prog_cxx_cross
echo $ac_n "checking whether we are using GNU C++""... $ac_c" 1>&6
echo "configure:1606: checking whether we are using GNU C++" >&5
echo "configure:1603: checking whether we are using GNU C++" >&5
if eval "test \"`echo '$''{'ac_cv_prog_gxx'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@ -1611,7 +1608,7 @@ else
yes;
#endif
EOF
if { ac_try='${CXX-g++} -E conftest.C'; { (eval echo configure:1615: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
if { ac_try='${CXX-g++} -E conftest.C'; { (eval echo configure:1612: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
ac_cv_prog_gxx=yes
else
ac_cv_prog_gxx=no
@ -1630,7 +1627,7 @@ ac_test_CXXFLAGS="${CXXFLAGS+set}"
ac_save_CXXFLAGS="$CXXFLAGS"
CXXFLAGS=
echo $ac_n "checking whether ${CXX-g++} accepts -g""... $ac_c" 1>&6
echo "configure:1634: checking whether ${CXX-g++} accepts -g" >&5
echo "configure:1631: checking whether ${CXX-g++} accepts -g" >&5
if eval "test \"`echo '$''{'ac_cv_prog_cxx_g'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@ -1675,7 +1672,7 @@ do
# Extract the first word of "$ac_prog", so it can be a program name with args.
set dummy $ac_prog; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
echo "configure:1679: checking for $ac_word" >&5
echo "configure:1676: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@ -1710,7 +1707,7 @@ do
# Extract the first word of "$ac_prog", so it can be a program name with args.
set dummy $ac_prog; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
echo "configure:1714: checking for $ac_word" >&5
echo "configure:1711: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_prog_AR'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@ -1745,7 +1742,7 @@ do
# Extract the first word of "$ac_prog", so it can be a program name with args.
set dummy $ac_prog; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
echo "configure:1749: checking for $ac_word" >&5
echo "configure:1746: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_prog_AS'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@ -1780,7 +1777,7 @@ do
# Extract the first word of "$ac_prog", so it can be a program name with args.
set dummy $ac_prog; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
echo "configure:1784: checking for $ac_word" >&5
echo "configure:1781: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_prog_LD'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@ -1815,7 +1812,7 @@ do
# Extract the first word of "$ac_prog", so it can be a program name with args.
set dummy $ac_prog; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
echo "configure:1819: checking for $ac_word" >&5
echo "configure:1816: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_prog_STRIP'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@ -1850,7 +1847,7 @@ do
# Extract the first word of "$ac_prog", so it can be a program name with args.
set dummy $ac_prog; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
echo "configure:1854: checking for $ac_word" >&5
echo "configure:1851: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_prog_WINDRES'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@ -1885,7 +1882,7 @@ else
# Extract the first word of "gcc", so it can be a program name with args.
set dummy gcc; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
echo "configure:1889: checking for $ac_word" >&5
echo "configure:1886: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@ -1915,7 +1912,7 @@ if test -z "$CC"; then
# Extract the first word of "cc", so it can be a program name with args.
set dummy cc; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
echo "configure:1919: checking for $ac_word" >&5
echo "configure:1916: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@ -1966,7 +1963,7 @@ fi
# Extract the first word of "cl", so it can be a program name with args.
set dummy cl; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
echo "configure:1970: checking for $ac_word" >&5
echo "configure:1967: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@ -1998,7 +1995,7 @@ fi
fi
echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works""... $ac_c" 1>&6
echo "configure:2002: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5
echo "configure:1999: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5
ac_ext=c
# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
@ -2009,12 +2006,12 @@ cross_compiling=$ac_cv_prog_cc_cross
cat > conftest.$ac_ext << EOF
#line 2013 "configure"
#line 2010 "configure"
#include "confdefs.h"
main(){return(0);}
EOF
if { (eval echo configure:2018: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
if { (eval echo configure:2015: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
ac_cv_prog_cc_works=yes
# If we can't run a trivial program, we are probably using a cross compiler.
if (./conftest; exit) 2>/dev/null; then
@ -2040,12 +2037,12 @@ if test $ac_cv_prog_cc_works = no; then
{ echo "configure: error: installation or configuration problem: C compiler cannot create executables." 1>&2; exit 1; }
fi
echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6
echo "configure:2044: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5
echo "configure:2041: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5
echo "$ac_t""$ac_cv_prog_cc_cross" 1>&6
cross_compiling=$ac_cv_prog_cc_cross
echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6
echo "configure:2049: checking whether we are using GNU C" >&5
echo "configure:2046: checking whether we are using GNU C" >&5
if eval "test \"`echo '$''{'ac_cv_prog_gcc'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@ -2054,7 +2051,7 @@ else
yes;
#endif
EOF
if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:2058: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:2055: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
ac_cv_prog_gcc=yes
else
ac_cv_prog_gcc=no
@ -2073,7 +2070,7 @@ ac_test_CFLAGS="${CFLAGS+set}"
ac_save_CFLAGS="$CFLAGS"
CFLAGS=
echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6
echo "configure:2077: checking whether ${CC-cc} accepts -g" >&5
echo "configure:2074: checking whether ${CC-cc} accepts -g" >&5
if eval "test \"`echo '$''{'ac_cv_prog_cc_g'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@ -2113,7 +2110,7 @@ do
# Extract the first word of "$ac_prog", so it can be a program name with args.
set dummy $ac_prog; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
echo "configure:2117: checking for $ac_word" >&5
echo "configure:2114: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_prog_CXX'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@ -2145,7 +2142,7 @@ test -n "$CXX" || CXX="gcc"
echo $ac_n "checking whether the C++ compiler ($CXX $CXXFLAGS $LDFLAGS) works""... $ac_c" 1>&6
echo "configure:2149: checking whether the C++ compiler ($CXX $CXXFLAGS $LDFLAGS) works" >&5
echo "configure:2146: checking whether the C++ compiler ($CXX $CXXFLAGS $LDFLAGS) works" >&5
ac_ext=C
# CXXFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
@ -2156,12 +2153,12 @@ cross_compiling=$ac_cv_prog_cxx_cross
cat > conftest.$ac_ext << EOF
#line 2160 "configure"
#line 2157 "configure"
#include "confdefs.h"
int main(){return(0);}
EOF
if { (eval echo configure:2165: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
if { (eval echo configure:2162: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
ac_cv_prog_cxx_works=yes
# If we can't run a trivial program, we are probably using a cross compiler.
if (./conftest; exit) 2>/dev/null; then
@ -2187,12 +2184,12 @@ if test $ac_cv_prog_cxx_works = no; then
{ echo "configure: error: installation or configuration problem: C++ compiler cannot create executables." 1>&2; exit 1; }
fi
echo $ac_n "checking whether the C++ compiler ($CXX $CXXFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6
echo "configure:2191: checking whether the C++ compiler ($CXX $CXXFLAGS $LDFLAGS) is a cross-compiler" >&5
echo "configure:2188: checking whether the C++ compiler ($CXX $CXXFLAGS $LDFLAGS) is a cross-compiler" >&5
echo "$ac_t""$ac_cv_prog_cxx_cross" 1>&6
cross_compiling=$ac_cv_prog_cxx_cross
echo $ac_n "checking whether we are using GNU C++""... $ac_c" 1>&6
echo "configure:2196: checking whether we are using GNU C++" >&5
echo "configure:2193: checking whether we are using GNU C++" >&5
if eval "test \"`echo '$''{'ac_cv_prog_gxx'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@ -2201,7 +2198,7 @@ else
yes;
#endif
EOF
if { ac_try='${CXX-g++} -E conftest.C'; { (eval echo configure:2205: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
if { ac_try='${CXX-g++} -E conftest.C'; { (eval echo configure:2202: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
ac_cv_prog_gxx=yes
else
ac_cv_prog_gxx=no
@ -2220,7 +2217,7 @@ ac_test_CXXFLAGS="${CXXFLAGS+set}"
ac_save_CXXFLAGS="$CXXFLAGS"
CXXFLAGS=
echo $ac_n "checking whether ${CXX-g++} accepts -g""... $ac_c" 1>&6
echo "configure:2224: checking whether ${CXX-g++} accepts -g" >&5
echo "configure:2221: checking whether ${CXX-g++} accepts -g" >&5
if eval "test \"`echo '$''{'ac_cv_prog_cxx_g'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@ -2254,7 +2251,7 @@ fi
fi
fi
echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6
echo "configure:2258: checking how to run the C preprocessor" >&5
echo "configure:2255: checking how to run the C preprocessor" >&5
# On Suns, sometimes $CPP names a directory.
if test -n "$CPP" && test -d "$CPP"; then
CPP=
@ -2269,13 +2266,13 @@ else
# On the NeXT, cc -E runs the code through the compiler's parser,
# not just through cpp.
cat > conftest.$ac_ext <<EOF
#line 2273 "configure"
#line 2270 "configure"
#include "confdefs.h"
#include <assert.h>
Syntax Error
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
{ (eval echo configure:2279: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
{ (eval echo configure:2276: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
if test -z "$ac_err"; then
:
@ -2286,13 +2283,13 @@ else
rm -rf conftest*
CPP="${CC-cc} -E -traditional-cpp"
cat > conftest.$ac_ext <<EOF
#line 2290 "configure"
#line 2287 "configure"
#include "confdefs.h"
#include <assert.h>
Syntax Error
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
{ (eval echo configure:2296: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
{ (eval echo configure:2293: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
if test -z "$ac_err"; then
:
@ -2303,13 +2300,13 @@ else
rm -rf conftest*
CPP="${CC-cc} -nologo -E"
cat > conftest.$ac_ext <<EOF
#line 2307 "configure"
#line 2304 "configure"
#include "confdefs.h"
#include <assert.h>
Syntax Error
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
{ (eval echo configure:2313: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
{ (eval echo configure:2310: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
if test -z "$ac_err"; then
:
@ -2336,7 +2333,7 @@ echo "$ac_t""$CPP" 1>&6
# Extract the first word of "ranlib", so it can be a program name with args.
set dummy ranlib; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
echo "configure:2340: checking for $ac_word" >&5
echo "configure:2337: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@ -2368,7 +2365,7 @@ do
# Extract the first word of "$ac_prog", so it can be a program name with args.
set dummy $ac_prog; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
echo "configure:2372: checking for $ac_word" >&5
echo "configure:2369: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_path_AS'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@ -2409,7 +2406,7 @@ do
# Extract the first word of "$ac_prog", so it can be a program name with args.
set dummy $ac_prog; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
echo "configure:2413: checking for $ac_word" >&5
echo "configure:2410: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_path_AR'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@ -2450,7 +2447,7 @@ do
# Extract the first word of "$ac_prog", so it can be a program name with args.
set dummy $ac_prog; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
echo "configure:2454: checking for $ac_word" >&5
echo "configure:2451: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_path_LD'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@ -2491,7 +2488,7 @@ do
# Extract the first word of "$ac_prog", so it can be a program name with args.
set dummy $ac_prog; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
echo "configure:2495: checking for $ac_word" >&5
echo "configure:2492: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_path_STRIP'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@ -2532,7 +2529,7 @@ do
# Extract the first word of "$ac_prog", so it can be a program name with args.
set dummy $ac_prog; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
echo "configure:2536: checking for $ac_word" >&5
echo "configure:2533: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_path_WINDRES'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@ -2600,7 +2597,7 @@ else
fi
echo $ac_n "checking for gcc -pipe support""... $ac_c" 1>&6
echo "configure:2604: checking for gcc -pipe support" >&5
echo "configure:2601: checking for gcc -pipe support" >&5
if test -n "$GNU_CC" && test -n "$GNU_CXX" && test -n "$GNU_AS"; then
echo '#include <stdio.h>' > dummy-hello.c
echo 'int main() { printf("Hello World\n"); return 0; }' >> dummy-hello.c
@ -2615,14 +2612,14 @@ if test -n "$GNU_CC" && test -n "$GNU_CXX" && test -n "$GNU_AS"; then
_SAVE_CFLAGS=$CFLAGS
CFLAGS="$CFLAGS -pipe"
cat > conftest.$ac_ext <<EOF
#line 2619 "configure"
#line 2616 "configure"
#include "confdefs.h"
#include <stdio.h>
int main() {
printf("Hello World\n");
; return 0; }
EOF
if { (eval echo configure:2626: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
if { (eval echo configure:2623: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
_res_gcc_pipe="yes"
else
@ -2649,7 +2646,7 @@ fi
if test "$GNU_CC"; then
echo $ac_n "checking for visibility(hidden) attribute""... $ac_c" 1>&6
echo "configure:2653: checking for visibility(hidden) attribute" >&5
echo "configure:2650: checking for visibility(hidden) attribute" >&5
if eval "test \"`echo '$''{'ac_cv_visibility_hidden'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@ -2673,7 +2670,7 @@ echo "$ac_t""$ac_cv_visibility_hidden" 1>&6
EOF
echo $ac_n "checking for visibility pragma support""... $ac_c" 1>&6
echo "configure:2677: checking for visibility pragma support" >&5
echo "configure:2674: checking for visibility pragma support" >&5
if eval "test \"`echo '$''{'ac_cv_visibility_pragma'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@ -2726,7 +2723,7 @@ do
# Extract the first word of "$ac_prog", so it can be a program name with args.
set dummy $ac_prog; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
echo "configure:2730: checking for $ac_word" >&5
echo "configure:2727: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_path_PERL'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@ -2983,17 +2980,17 @@ EOF
DSO_LDOPTS='-brtl -bnortllib -bM:SRE -bnoentry -bexpall -blibpath:/usr/lib:/lib'
ac_safe=`echo "sys/atomic_op.h" | sed 'y%./+-%__p_%'`
echo $ac_n "checking for sys/atomic_op.h""... $ac_c" 1>&6
echo "configure:2987: checking for sys/atomic_op.h" >&5
echo "configure:2984: checking for sys/atomic_op.h" >&5
if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
#line 2992 "configure"
#line 2989 "configure"
#include "confdefs.h"
#include <sys/atomic_op.h>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
{ (eval echo configure:2997: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
{ (eval echo configure:2994: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
if test -z "$ac_err"; then
rm -rf conftest*
@ -3150,7 +3147,7 @@ EOF
_DEBUG_FLAGS='-gdwarf-2 -O0'
MKSHLIB='$(CCC) $(DSO_LDOPTS) -o $@'
echo $ac_n "checking for gethostbyaddr in -lbind""... $ac_c" 1>&6
echo "configure:3154: checking for gethostbyaddr in -lbind" >&5
echo "configure:3151: checking for gethostbyaddr in -lbind" >&5
ac_lib_var=`echo bind'_'gethostbyaddr | sed 'y%./+-%__p_%'`
if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
@ -3158,7 +3155,7 @@ else
ac_save_LIBS="$LIBS"
LIBS="-lbind $LIBS"
cat > conftest.$ac_ext <<EOF
#line 3162 "configure"
#line 3159 "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
@ -3169,7 +3166,7 @@ int main() {
gethostbyaddr()
; return 0; }
EOF
if { (eval echo configure:3173: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
if { (eval echo configure:3170: \"$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
@ -3737,7 +3734,7 @@ EOF
if test "$DEFAULT_IMPL_STRATEGY" = "_EMU"; then
USE_NSPR_THREADS=1
USE_PTHREADS=
USE_USER_THREADS=
USE_USER_PTHREADS=
elif test "$DEFAULT_IMPL_STRATEGY" = "_PTH"; then
USE_PTHREADS=1
if test "$USE_NSPR_THREADS"; then
@ -4504,17 +4501,17 @@ EOF
_OPTIMIZE_FLAGS="$_OPTIMIZE_FLAGS -Olimit 4000"
ac_safe=`echo "machine/builtins.h" | sed 'y%./+-%__p_%'`
echo $ac_n "checking for machine/builtins.h""... $ac_c" 1>&6
echo "configure:4508: checking for machine/builtins.h" >&5
echo "configure:4505: checking for machine/builtins.h" >&5
if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
#line 4513 "configure"
#line 4510 "configure"
#include "confdefs.h"
#include <machine/builtins.h>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
{ (eval echo configure:4518: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
{ (eval echo configure:4515: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
if test -z "$ac_err"; then
rm -rf conftest*
@ -4732,7 +4729,7 @@ EOF
;;
*-solaris*)
if test -z "$USE_USER_THREADS" && test -z "$USE_NATIVE_THREADS"; then
if test -z "$USE_NSPR_THREADS"; then
USE_PTHREADS=1
fi
cat >> confdefs.h <<\EOF
@ -5029,7 +5026,7 @@ case $target in
;;
*)
echo $ac_n "checking for dlopen in -ldl""... $ac_c" 1>&6
echo "configure:5033: checking for dlopen in -ldl" >&5
echo "configure:5030: 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
@ -5037,7 +5034,7 @@ else
ac_save_LIBS="$LIBS"
LIBS="-ldl $LIBS"
cat > conftest.$ac_ext <<EOF
#line 5041 "configure"
#line 5038 "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
@ -5048,7 +5045,7 @@ int main() {
dlopen()
; return 0; }
EOF
if { (eval echo configure:5052: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
if { (eval echo configure:5049: \"$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
@ -5065,17 +5062,17 @@ if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
echo "$ac_t""yes" 1>&6
ac_safe=`echo "dlfcn.h" | sed 'y%./+-%__p_%'`
echo $ac_n "checking for dlfcn.h""... $ac_c" 1>&6
echo "configure:5069: checking for dlfcn.h" >&5
echo "configure:5066: checking for dlfcn.h" >&5
if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
#line 5074 "configure"
#line 5071 "configure"
#include "confdefs.h"
#include <dlfcn.h>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
{ (eval echo configure:5079: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
{ (eval echo configure:5076: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
if test -z "$ac_err"; then
rm -rf conftest*
@ -5108,13 +5105,13 @@ esac
if test $ac_cv_prog_gcc = yes; then
echo $ac_n "checking whether ${CC-cc} needs -traditional""... $ac_c" 1>&6
echo "configure:5112: checking whether ${CC-cc} needs -traditional" >&5
echo "configure:5109: checking whether ${CC-cc} needs -traditional" >&5
if eval "test \"`echo '$''{'ac_cv_prog_gcc_traditional'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
ac_pattern="Autoconf.*'x'"
cat > conftest.$ac_ext <<EOF
#line 5118 "configure"
#line 5115 "configure"
#include "confdefs.h"
#include <sgtty.h>
Autoconf TIOCGETP
@ -5132,7 +5129,7 @@ rm -f conftest*
if test $ac_cv_prog_gcc_traditional = no; then
cat > conftest.$ac_ext <<EOF
#line 5136 "configure"
#line 5133 "configure"
#include "confdefs.h"
#include <termio.h>
Autoconf TCGETA
@ -5156,12 +5153,12 @@ fi
for ac_func in lchown strerror
do
echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
echo "configure:5160: checking for $ac_func" >&5
echo "configure:5157: checking for $ac_func" >&5
if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
#line 5165 "configure"
#line 5162 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
which can conflict with char $ac_func(); below. */
@ -5184,7 +5181,7 @@ $ac_func();
; return 0; }
EOF
if { (eval echo configure:5188: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
if { (eval echo configure:5185: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
eval "ac_cv_func_$ac_func=yes"
else
@ -5225,7 +5222,7 @@ hpux*)
if test -z "$GNU_CC"; then
echo $ac_n "checking for +Olit support""... $ac_c" 1>&6
echo "configure:5229: checking for +Olit support" >&5
echo "configure:5226: checking for +Olit support" >&5
if eval "test \"`echo '$''{'ac_cv_hpux_usable_olit_option'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@ -5264,7 +5261,7 @@ darwin*)
*)
echo $ac_n "checking for pthread_create in -lpthreads""... $ac_c" 1>&6
echo "configure:5268: checking for pthread_create in -lpthreads" >&5
echo "configure:5265: checking for pthread_create in -lpthreads" >&5
echo "
#include <pthread.h>
void *foo(void *v) { return v; }
@ -5286,7 +5283,7 @@ echo "
echo "$ac_t""no" 1>&6
echo $ac_n "checking for pthread_create in -lpthread""... $ac_c" 1>&6
echo "configure:5290: checking for pthread_create in -lpthread" >&5
echo "configure:5287: checking for pthread_create in -lpthread" >&5
echo "
#include <pthread.h>
void *foo(void *v) { return v; }
@ -5308,7 +5305,7 @@ echo "
echo "$ac_t""no" 1>&6
echo $ac_n "checking for pthread_create in -lc_r""... $ac_c" 1>&6
echo "configure:5312: checking for pthread_create in -lc_r" >&5
echo "configure:5309: checking for pthread_create in -lc_r" >&5
echo "
#include <pthread.h>
void *foo(void *v) { return v; }
@ -5330,7 +5327,7 @@ echo "
echo "$ac_t""no" 1>&6
echo $ac_n "checking for pthread_create in -lc""... $ac_c" 1>&6
echo "configure:5334: checking for pthread_create in -lc" >&5
echo "configure:5331: checking for pthread_create in -lc" >&5
echo "
#include <pthread.h>
void *foo(void *v) { return v; }
@ -5429,19 +5426,6 @@ if test "${with_bthreads+set}" = set; then
fi
;;
*-solaris*)
# Check whether --with-native-threads or --without-native-threads was given.
if test "${with_native_threads+set}" = set; then
withval="$with_native_threads"
if test "$withval" = "yes"; then
USE_NATIVE_THREADS=1
USE_USER_PTHREADS=
USE_PTHREADS=
fi
fi
;;
esac
fi # SKIP_LIBRARY_CHECKS
@ -5475,7 +5459,7 @@ if test -n "$USE_PTHREADS"; then
rm -f conftest*
ac_cv_have_dash_pthread=no
echo $ac_n "checking whether ${CC-cc} accepts -pthread""... $ac_c" 1>&6
echo "configure:5479: checking whether ${CC-cc} accepts -pthread" >&5
echo "configure:5463: checking whether ${CC-cc} accepts -pthread" >&5
echo 'int main() { return 0; }' | cat > conftest.c
${CC-cc} -pthread -o conftest conftest.c > conftest.out 2>&1
if test $? -eq 0; then
@ -5498,7 +5482,7 @@ echo "configure:5479: checking whether ${CC-cc} accepts -pthread" >&5
ac_cv_have_dash_pthreads=no
if test "$ac_cv_have_dash_pthread" = "no"; then
echo $ac_n "checking whether ${CC-cc} accepts -pthreads""... $ac_c" 1>&6
echo "configure:5502: checking whether ${CC-cc} accepts -pthreads" >&5
echo "configure:5486: checking whether ${CC-cc} accepts -pthreads" >&5
echo 'int main() { return 0; }' | cat > conftest.c
${CC-cc} -pthreads -o conftest conftest.c > conftest.out 2>&1
if test $? -eq 0; then
@ -5729,20 +5713,13 @@ EOF
fi
;;
*-solaris*)
if test -n "$USE_NATIVE_THREADS"; then
if test -n "$USE_NSPR_THREADS"; then
cat >> confdefs.h <<\EOF
#define _PR_GLOBAL_THREADS_ONLY 1
EOF
else
if test -n "$USE_NSPR_THREADS"; then
cat >> confdefs.h <<\EOF
#define _PR_LOCAL_THREADS_ONLY 1
EOF
fi
fi
if test -z "$USE_NSPR_THREADS"; then
if test -n "$USE_PTHREADS"; then
cat >> confdefs.h <<\EOF
#define _REENTRANT 1
EOF
@ -5761,9 +5738,6 @@ EOF
if test -n "$USE_64"; then
PR_MD_ASFILES=os_SunOS_sparcv9.s
fi
if test -n "$USE_NATIVE_THREADS"; then
PR_MD_ASFILES="$PR_MD_ASFILES os_SunOS.s"
fi
fi
fi
;;
@ -5915,7 +5889,6 @@ esac
MAKEFILES="
@ -6163,7 +6136,6 @@ s%@ENABLE_STRIP@%$ENABLE_STRIP%g
s%@USE_PTHREADS@%$USE_PTHREADS%g
s%@USE_BTHREADS@%$USE_BTHREADS%g
s%@USE_USER_PTHREADS@%$USE_USER_PTHREADS%g
s%@USE_NATIVE_THREADS@%$USE_NATIVE_THREADS%g
s%@USE_NSPR_THREADS@%$USE_NSPR_THREADS%g
s%@LIBNSPR@%$LIBNSPR%g
s%@LIBPLC@%$LIBPLC%g

View File

@ -1315,7 +1315,7 @@ tools are selected during the Xcode/Developer Tools installation.])
if test "$DEFAULT_IMPL_STRATEGY" = "_EMU"; then
USE_NSPR_THREADS=1
USE_PTHREADS=
USE_USER_THREADS=
USE_USER_PTHREADS=
elif test "$DEFAULT_IMPL_STRATEGY" = "_PTH"; then
USE_PTHREADS=1
if test "$USE_NSPR_THREADS"; then
@ -1970,7 +1970,7 @@ mips-sony-newsos*)
;;
*-solaris*)
if test -z "$USE_USER_THREADS" && test -z "$USE_NATIVE_THREADS"; then
if test -z "$USE_NSPR_THREADS"; then
USE_PTHREADS=1
fi
AC_DEFINE(XP_UNIX)
@ -2405,17 +2405,6 @@ case "$target" in
USE_PTHREADS=
fi])
;;
*-solaris*)
AC_ARG_WITH(native-threads,
[ --with-native-threads Use native system threads as thread subsystem
(Solaris only)],
[ if test "$withval" = "yes"; then
USE_NATIVE_THREADS=1
USE_USER_PTHREADS=
USE_PTHREADS=
fi])
;;
esac
fi # SKIP_LIBRARY_CHECKS
@ -2625,14 +2614,10 @@ case "$target" in
fi
;;
*-solaris*)
if test -n "$USE_NATIVE_THREADS"; then
AC_DEFINE(_PR_GLOBAL_THREADS_ONLY)
else
if test -n "$USE_NSPR_THREADS"; then
AC_DEFINE(_PR_LOCAL_THREADS_ONLY)
fi
if test -n "$USE_NSPR_THREADS"; then
AC_DEFINE(_PR_LOCAL_THREADS_ONLY)
fi
if test -z "$USE_NSPR_THREADS"; then
if test -n "$USE_PTHREADS"; then
AC_DEFINE(_REENTRANT)
AC_DEFINE(HAVE_POINTER_LOCALTIME_R)
if test "$OS_TEST" = "i86pc"; then
@ -2645,9 +2630,6 @@ case "$target" in
if test -n "$USE_64"; then
PR_MD_ASFILES=os_SunOS_sparcv9.s
fi
if test -n "$USE_NATIVE_THREADS"; then
PR_MD_ASFILES="$PR_MD_ASFILES os_SunOS.s"
fi
fi
fi
;;
@ -2737,7 +2719,6 @@ AC_SUBST(ENABLE_STRIP)
AC_SUBST(USE_PTHREADS)
AC_SUBST(USE_BTHREADS)
AC_SUBST(USE_USER_PTHREADS)
AC_SUBST(USE_NATIVE_THREADS)
AC_SUBST(USE_NSPR_THREADS)
AC_SUBST(LIBNSPR)

View File

@ -152,23 +152,6 @@ else
LDOPTS += -R $(PWD)/$(dist_libdir)
endif
endif
ifneq ($(LOCAL_THREADS_ONLY),1)
# SunOS 5.4 and 5.5 need to link with -lthread or -lpthread,
# even though we already linked with these system libraries
# when we built libnspr.so.
ifeq ($(OS_RELEASE), 5.4)
EXTRA_LIBS = -lthread
endif
ifeq ($(OS_RELEASE), 5.5)
ifdef USE_PTHREADS
EXTRA_LIBS = -lpthread
else
EXTRA_LIBS = -lthread
endif
endif
endif # LOCAL_THREADS_ONLY
endif # SunOS
ifeq ($(OS_ARCH),NEC)

View File

@ -129,14 +129,6 @@ ifdef NS_USE_GCC
LDOPTS += -Xlinker -R -Xlinker $(PWD)/$(dist_libdir)
else
LDOPTS += -R $(PWD)/$(dist_libdir)
# CC on SunOS 5.4 and 5.5.x need to link with -lthread or -lpthread
# (or use the -mt switch) even though we already linked with these
# system libraries when we built libnspr.so.
ifdef USE_PTHREADS
EXTRA_LIBS = -lpthread
else
EXTRA_LIBS = -lthread
endif # USE_PTHREADS
endif # NS_USE_GCC
endif # 4.1.3_U1
endif # SunOS

View File

@ -151,21 +151,6 @@ else
LDOPTS += -R $(PWD)/$(dist_libdir)
endif
endif
# SunOS 5.4 and 5.5 need to link with -lthread or -lpthread,
# even though we already linked with these system libraries
# when we built libnspr.so.
ifeq ($(OS_RELEASE), 5.4)
EXTRA_LIBS = -lthread
endif
ifeq ($(OS_RELEASE), 5.5)
ifdef USE_PTHREADS
EXTRA_LIBS = -lpthread
else
EXTRA_LIBS = -lthread
endif
endif
endif # SunOS
ifeq ($(OS_ARCH), NCR)

View File

@ -75,16 +75,12 @@
* Intel x86 has atomic instructions.
*
* Sparc v8 does not have instructions to efficiently implement
* atomic increment/decrement operations. In the local threads
* only and pthreads versions, we use the default atomic routine
* implementation in pratom.c. The obsolete global threads only
* version uses a global mutex_t to implement the atomic routines
* in solaris.c, which is actually equivalent to the default
* implementation.
* atomic increment/decrement operations. We use the default
* atomic routine implementation in pratom.c.
*
* 64-bit Solaris requires sparc v9, which has atomic instructions.
*/
#if defined(i386) || defined(_PR_GLOBAL_THREADS_ONLY) || defined(IS_64)
#if defined(i386) || defined(IS_64)
#define _PR_HAVE_ATOMIC_OPS
#endif
@ -140,7 +136,7 @@ struct _md_sockaddr_in6 {
PRUint32 __sin6_src_id;
};
#endif
#if defined(_PR_GLOBAL_THREADS_ONLY) || defined(_PR_PTHREADS)
#if defined(_PR_PTHREADS)
#define _PR_HAVE_GETHOST_R
#define _PR_HAVE_GETHOST_R_POINTER
#endif
@ -177,278 +173,7 @@ NSPR_API(void) _MD_EarlyInit(void);
#define _MD_EARLY_INIT _MD_EarlyInit
#define _MD_FINAL_INIT _PR_UnixInit
#elif defined(_PR_GLOBAL_THREADS_ONLY)
#include "prthread.h"
#include <ucontext.h>
/*
** Iinitialization Related definitions
*/
NSPR_API(void) _MD_EarlyInit(void);
#define _MD_EARLY_INIT _MD_EarlyInit
#define _MD_FINAL_INIT _PR_UnixInit
#define _MD_GET_SP(threadp) threadp->md.sp
/*
** Clean-up the thread machine dependent data structure
*/
#define _MD_INIT_THREAD _MD_InitializeThread
#define _MD_INIT_ATTACHED_THREAD _MD_InitializeThread
NSPR_API(PRStatus) _MD_CreateThread(PRThread *thread,
void (*start)(void *),
PRThreadPriority priority,
PRThreadScope scope,
PRThreadState state,
PRUint32 stackSize);
#define _MD_CREATE_THREAD _MD_CreateThread
#define _PR_CONTEXT_TYPE ucontext_t
#define CONTEXT(_thread) (&(_thread)->md.context)
#include <thread.h>
#include <sys/lwp.h>
#include <synch.h>
extern struct PRLock *_pr_schedLock;
/*
** Thread Local Storage
*/
#define THREAD_KEY_T thread_key_t
extern struct PRThread *_pr_attached_thread_tls();
extern struct PRThread *_pr_current_thread_tls();
extern struct _PRCPU *_pr_current_cpu_tls();
extern struct PRThread *_pr_last_thread_tls();
extern THREAD_KEY_T threadid_key;
extern THREAD_KEY_T cpuid_key;
extern THREAD_KEY_T last_thread_key;
#define _MD_GET_ATTACHED_THREAD() _pr_attached_thread_tls()
#define _MD_CURRENT_THREAD() _pr_current_thread_tls()
#define _MD_CURRENT_CPU() _pr_current_cpu_tls()
#define _MD_LAST_THREAD() _pr_last_thread_tls()
#define _MD_SET_CURRENT_THREAD(newval) \
PR_BEGIN_MACRO \
thr_setspecific(threadid_key, (void *)newval); \
PR_END_MACRO
#define _MD_SET_CURRENT_CPU(newval) \
PR_BEGIN_MACRO \
thr_setspecific(cpuid_key, (void *)newval); \
PR_END_MACRO
#define _MD_SET_LAST_THREAD(newval) \
PR_BEGIN_MACRO \
thr_setspecific(last_thread_key, (void *)newval); \
PR_END_MACRO
#define _MD_CLEAN_THREAD(_thread) _MD_cleanup_thread(_thread)
extern void _MD_exit_thread(PRThread *thread);
#define _MD_EXIT_THREAD(thread) _MD_exit_thread(thread)
#define _MD_SUSPEND_THREAD(thread) _MD_Suspend(thread)
#define _MD_RESUME_THREAD(thread) thr_continue((thread)->md.handle)
/* XXXX Needs to be defined - Prashant */
#define _MD_SUSPEND_CPU(cpu)
#define _MD_RESUME_CPU(cpu)
extern void _MD_Begin_SuspendAll(void);
extern void _MD_End_SuspendAll(void);
extern void _MD_End_ResumeAll(void);
#define _MD_BEGIN_SUSPEND_ALL() _MD_Begin_SuspendAll()
#define _MD_BEGIN_RESUME_ALL()
#define _MD_END_SUSPEND_ALL() _MD_End_SuspendAll()
#define _MD_END_RESUME_ALL() _MD_End_ResumeAll()
#define _MD_INIT_LOCKS()
#define _MD_NEW_LOCK(md_lockp) (mutex_init(&((md_lockp)->lock),USYNC_THREAD,NULL) ? PR_FAILURE : PR_SUCCESS)
#define _MD_FREE_LOCK(md_lockp) mutex_destroy(&((md_lockp)->lock))
#define _MD_UNLOCK(md_lockp) mutex_unlock(&((md_lockp)->lock))
#define _MD_TEST_AND_LOCK(md_lockp) mutex_trylock(&((md_lockp)->lock))
struct _MDLock;
NSPR_API(void) _MD_lock(struct _MDLock *md_lock);
#undef PROFILE_LOCKS
#ifndef PROFILE_LOCKS
#define _MD_LOCK(md_lockp) _MD_lock(md_lockp)
#else
#define _MD_LOCK(md_lockp) \
PR_BEGIN_MACRO \
int rv = _MD_TEST_AND_LOCK(md_lockp); \
if (rv == 0) { \
(md_lockp)->hitcount++; \
} else { \
(md_lockp)->misscount++; \
_MD_lock(md_lockp); \
} \
PR_END_MACRO
#endif
#define _PR_LOCK_HEAP() if (_pr_heapLock) _MD_LOCK(&_pr_heapLock->md)
#define _PR_UNLOCK_HEAP() if (_pr_heapLock) _MD_UNLOCK(&_pr_heapLock->md)
#define _MD_ATTACH_THREAD(threadp)
#define THR_KEYCREATE thr_keycreate
#define THR_SELF thr_self
#define _MD_NEW_CV(condp) cond_init(&((condp)->cv), USYNC_THREAD, 0)
#define COND_WAIT(condp, mutexp) cond_wait(condp, mutexp)
#define COND_TIMEDWAIT(condp, mutexp, tspec) \
cond_timedwait(condp, mutexp, tspec)
#define _MD_NOTIFY_CV(condp, lockp) cond_signal(&((condp)->cv))
#define _MD_NOTIFYALL_CV(condp,unused) cond_broadcast(&((condp)->cv))
#define _MD_FREE_CV(condp) cond_destroy(&((condp)->cv))
#define _MD_YIELD() thr_yield()
#include <time.h>
/*
* Because clock_gettime() on Solaris/x86 2.4 always generates a
* segmentation fault, we use an emulated version _pr_solx86_clock_gettime(),
* which is implemented using gettimeofday().
*/
#if defined(i386) && defined(SOLARIS2_4)
extern int _pr_solx86_clock_gettime(clockid_t clock_id, struct timespec *tp);
#define GETTIME(tt) _pr_solx86_clock_gettime(CLOCK_REALTIME, (tt))
#else
#define GETTIME(tt) clock_gettime(CLOCK_REALTIME, (tt))
#endif /* i386 && SOLARIS2_4 */
#define MUTEX_T mutex_t
#define COND_T cond_t
#define _MD_NEW_SEM(md_semp,_val) sema_init(&((md_semp)->sem),_val,USYNC_THREAD,NULL)
#define _MD_DESTROY_SEM(md_semp) sema_destroy(&((md_semp)->sem))
#define _MD_WAIT_SEM(md_semp) sema_wait(&((md_semp)->sem))
#define _MD_POST_SEM(md_semp) sema_post(&((md_semp)->sem))
#define _MD_SAVE_ERRNO(_thread)
#define _MD_RESTORE_ERRNO(_thread)
#define _MD_INIT_RUNNING_CPU(cpu) _MD_unix_init_running_cpu(cpu)
extern struct _MDLock _pr_ioq_lock;
#define _MD_IOQ_LOCK() _MD_LOCK(&_pr_ioq_lock)
#define _MD_IOQ_UNLOCK() _MD_UNLOCK(&_pr_ioq_lock)
extern PRStatus _MD_wait(struct PRThread *, PRIntervalTime timeout);
#define _MD_WAIT _MD_wait
extern PRStatus _MD_WakeupWaiter(struct PRThread *);
#define _MD_WAKEUP_WAITER _MD_WakeupWaiter
NSPR_API(void) _MD_InitIO(void);
#define _MD_INIT_IO _MD_InitIO
#define _MD_INIT_CONTEXT(_thread, _sp, _main, status) \
PR_BEGIN_MACRO \
*status = PR_TRUE; \
PR_END_MACRO
#define _MD_SWITCH_CONTEXT(_thread)
#define _MD_RESTORE_CONTEXT(_newThread)
struct _MDLock {
MUTEX_T lock;
#ifdef PROFILE_LOCKS
PRInt32 hitcount;
PRInt32 misscount;
#endif
};
struct _MDCVar {
COND_T cv;
};
struct _MDSemaphore {
sema_t sem;
};
struct _MDThread {
_PR_CONTEXT_TYPE context;
thread_t handle;
lwpid_t lwpid;
uint_t sp; /* stack pointer */
uint_t threadID; /* ptr to solaris-internal thread id structures */
struct _MDSemaphore waiter_sem;
};
struct _MDThreadStack {
PRInt8 notused;
};
struct _MDSegment {
PRInt8 notused;
};
/*
* md-specific cpu structure field, common to all Unix platforms
*/
#define _PR_MD_MAX_OSFD FD_SETSIZE
struct _MDCPU_Unix {
PRCList ioQ;
PRUint32 ioq_timeout;
PRInt32 ioq_max_osfd;
PRInt32 ioq_osfd_cnt;
#ifndef _PR_USE_POLL
fd_set fd_read_set, fd_write_set, fd_exception_set;
PRInt16 fd_read_cnt[_PR_MD_MAX_OSFD],fd_write_cnt[_PR_MD_MAX_OSFD],
fd_exception_cnt[_PR_MD_MAX_OSFD];
#else
struct pollfd *ioq_pollfds;
int ioq_pollfds_size;
#endif /* _PR_USE_POLL */
};
#define _PR_IOQ(_cpu) ((_cpu)->md.md_unix.ioQ)
#define _PR_ADD_TO_IOQ(_pq, _cpu) PR_APPEND_LINK(&_pq.links, &_PR_IOQ(_cpu))
#define _PR_FD_READ_SET(_cpu) ((_cpu)->md.md_unix.fd_read_set)
#define _PR_FD_READ_CNT(_cpu) ((_cpu)->md.md_unix.fd_read_cnt)
#define _PR_FD_WRITE_SET(_cpu) ((_cpu)->md.md_unix.fd_write_set)
#define _PR_FD_WRITE_CNT(_cpu) ((_cpu)->md.md_unix.fd_write_cnt)
#define _PR_FD_EXCEPTION_SET(_cpu) ((_cpu)->md.md_unix.fd_exception_set)
#define _PR_FD_EXCEPTION_CNT(_cpu) ((_cpu)->md.md_unix.fd_exception_cnt)
#define _PR_IOQ_TIMEOUT(_cpu) ((_cpu)->md.md_unix.ioq_timeout)
#define _PR_IOQ_MAX_OSFD(_cpu) ((_cpu)->md.md_unix.ioq_max_osfd)
#define _PR_IOQ_OSFD_CNT(_cpu) ((_cpu)->md.md_unix.ioq_osfd_cnt)
#define _PR_IOQ_POLLFDS(_cpu) ((_cpu)->md.md_unix.ioq_pollfds)
#define _PR_IOQ_POLLFDS_SIZE(_cpu) ((_cpu)->md.md_unix.ioq_pollfds_size)
#define _PR_IOQ_MIN_POLLFDS_SIZE(_cpu) 32
struct _MDCPU {
struct _MDCPU_Unix md_unix;
};
/* The following defines the unwrapped versions of select() and poll(). */
extern int _select(int nfds, fd_set *readfds, fd_set *writefds,
fd_set *exceptfds, struct timeval *timeout);
#define _MD_SELECT _select
#include <poll.h>
#define _MD_POLL _poll
extern int _poll(struct pollfd *fds, unsigned long nfds, int timeout);
PR_BEGIN_EXTERN_C
/*
** Missing function prototypes
*/
extern int gethostname (char *name, int namelen);
PR_END_EXTERN_C
#else /* _PR_GLOBAL_THREADS_ONLY */
#else /* _PR_PTHREADS */
/*
* LOCAL_THREADS_ONLY implementation on Solaris
@ -462,7 +187,7 @@ PR_END_EXTERN_C
#include <synch.h>
/*
** Iinitialization Related definitions
** Initialization Related definitions
*/
NSPR_API(void) _MD_EarlyInit(void);
@ -798,7 +523,7 @@ extern int gethostname (char *name, int namelen);
PR_END_EXTERN_C
#endif /* _PR_GLOBAL_THREADS_ONLY */
#endif /* _PR_PTHREADS */
extern void _MD_solaris_map_sendfile_error(int err);

View File

@ -89,15 +89,11 @@ else
LIBRT=-lposix4
endif
ifdef USE_PTHREADS
OS_LIBS = -lpthread ${LIBRT} -lsocket -lnsl -ldl -lc
else
ifdef LOCAL_THREADS_ONLY
OS_LIBS = -lsocket -lnsl -ldl -lc
else
OS_LIBS = -lthread ${LIBRT} -lsocket -lnsl -ldl -lc
OS_LIBS = -lpthread ${LIBRT} -lsocket -lnsl -ldl -lc
endif # LOCAL_THREADS_ONLY
endif # USE_PTHREADS
ifeq ($(OS_TEST),sun4u)
ifndef USE_64
DSO_LDOPTS += -Wl,-f,\$$ORIGIN/cpu/\$$ISALIST/lib$(ULTRASPARC_LIBRARY)$(LIBRARY_VERSION).so

View File

@ -108,23 +108,6 @@ ifeq ($(OS_ARCH), SunOS)
LDOPTS += -R $(PWD)/$(dist_libdir)
endif
endif
ifneq ($(LOCAL_THREADS_ONLY),1)
# SunOS 5.4 and 5.5 need to link with -lthread or -lpthread,
# even though we already linked with these system libraries
# when we built libnspr.so.
ifeq ($(OS_RELEASE), 5.4)
EXTRA_LIBS = -lthread
endif
ifeq ($(OS_RELEASE), 5.5)
ifdef USE_PTHREADS
EXTRA_LIBS = -lpthread
else
EXTRA_LIBS = -lthread
endif
endif
endif # LOCAL_THREADS_ONLY
endif # SunOS
ifeq ($(OS_ARCH), WINNT)

View File

@ -1,71 +0,0 @@
/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
/* ***** BEGIN LICENSE BLOCK *****
* Version: MPL 1.1/GPL 2.0/LGPL 2.1
*
* The contents of this file are subject to the Mozilla Public License Version
* 1.1 (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
* http://www.mozilla.org/MPL/
*
* Software distributed under the License is distributed on an "AS IS" basis,
* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
* for the specific language governing rights and limitations under the
* License.
*
* The Original Code is the Netscape Portable Runtime (NSPR).
*
* The Initial Developer of the Original Code is
* Netscape Communications Corporation.
* Portions created by the Initial Developer are Copyright (C) 1998-2000
* the Initial Developer. All Rights Reserved.
*
* Contributor(s):
*
* Alternatively, the contents of this file may be used under the terms of
* either the GNU General Public License Version 2 or later (the "GPL"), or
* the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
* in which case the provisions of the GPL or the LGPL are applicable instead
* of those above. If you wish to allow use of your version of this file only
* under the terms of either the GPL or the LGPL, and not to allow others to
* use your version of this file under the terms of the MPL, indicate your
* decision by deleting the provisions above and replace them with the notice
* and other provisions required by the GPL or the LGPL. If you do not delete
* the provisions above, a recipient may use your version of this file under
* the terms of any one of the MPL, the GPL or the LGPL.
*
* ***** END LICENSE BLOCK ***** */
.text
/*
* sol_getsp()
*
* Return the current sp (for debugging)
*/
.global sol_getsp
sol_getsp:
retl
mov %sp, %o0
/*
* sol_curthread()
*
* Return a unique identifier for the currently active thread.
*/
.global sol_curthread
sol_curthread:
retl
mov %g7, %o0
.global __MD_FlushRegisterWindows
.global _MD_FlushRegisterWindows
__MD_FlushRegisterWindows:
_MD_FlushRegisterWindows:
ta 3
ret
restore

View File

@ -86,700 +86,6 @@ PRWord *_MD_HomeGCRegisters(PRThread *t, PRIntn isCurrent, PRIntn *np)
}
#endif /* _PR_PTHREADS */
#if !defined(i386) && !defined(IS_64)
#if defined(_PR_HAVE_ATOMIC_OPS)
/* NOTE:
* SPARC v9 (Ultras) do have an atomic test-and-set operation. But
* SPARC v8 doesn't. We should detect in the init if we are running on
* v8 or v9, and then use assembly where we can.
*
* This code uses the Solaris threads API. It can be used in both the
* pthreads and Solaris threads versions of nspr20 because "POSIX threads
* and Solaris threads are fully compatible even within the same process",
* to quote from pthread_create(3T).
*/
#include <thread.h>
#include <synch.h>
static mutex_t _solaris_atomic = DEFAULTMUTEX;
PRInt32
_MD_AtomicIncrement(PRInt32 *val)
{
PRInt32 rv;
if (mutex_lock(&_solaris_atomic) != 0)
PR_ASSERT(0);
rv = ++(*val);
if (mutex_unlock(&_solaris_atomic) != 0)\
PR_ASSERT(0);
return rv;
}
PRInt32
_MD_AtomicAdd(PRInt32 *ptr, PRInt32 val)
{
PRInt32 rv;
if (mutex_lock(&_solaris_atomic) != 0)
PR_ASSERT(0);
rv = ((*ptr) += val);
if (mutex_unlock(&_solaris_atomic) != 0)\
PR_ASSERT(0);
return rv;
}
PRInt32
_MD_AtomicDecrement(PRInt32 *val)
{
PRInt32 rv;
if (mutex_lock(&_solaris_atomic) != 0)
PR_ASSERT(0);
rv = --(*val);
if (mutex_unlock(&_solaris_atomic) != 0)\
PR_ASSERT(0);
return rv;
}
PRInt32
_MD_AtomicSet(PRInt32 *val, PRInt32 newval)
{
PRInt32 rv;
if (mutex_lock(&_solaris_atomic) != 0)
PR_ASSERT(0);
rv = *val;
*val = newval;
if (mutex_unlock(&_solaris_atomic) != 0)\
PR_ASSERT(0);
return rv;
}
#endif /* _PR_HAVE_ATOMIC_OPS */
#endif /* !defined(i386) */
#if defined(_PR_GLOBAL_THREADS_ONLY)
#include <signal.h>
#include <errno.h>
#include <fcntl.h>
#include <thread.h>
#include <sys/lwp.h>
#include <sys/procfs.h>
#include <sys/syscall.h>
extern int syscall(); /* not declared in sys/syscall.h */
static sigset_t old_mask; /* store away original gc thread sigmask */
static PRIntn gcprio; /* store away original gc thread priority */
THREAD_KEY_T threadid_key;
THREAD_KEY_T cpuid_key;
THREAD_KEY_T last_thread_key;
static sigset_t set, oldset;
static void
threadid_key_destructor(void *value)
{
PRThread *me = (PRThread *)value;
PR_ASSERT(me != NULL);
/* the thread could be PRIMORDIAL (thus not ATTACHED) */
if (me->flags & _PR_ATTACHED) {
/*
* The Solaris thread library sets the thread specific
* data (the current thread) to NULL before invoking
* the destructor. We need to restore it to prevent the
* _PR_MD_CURRENT_THREAD() call in _PRI_DetachThread()
* from attaching the thread again.
*/
_PR_MD_SET_CURRENT_THREAD(me);
_PRI_DetachThread();
}
}
void _MD_EarlyInit(void)
{
THR_KEYCREATE(&threadid_key, threadid_key_destructor);
THR_KEYCREATE(&cpuid_key, NULL);
THR_KEYCREATE(&last_thread_key, NULL);
sigemptyset(&set);
sigaddset(&set, SIGALRM);
}
PRStatus _MD_CreateThread(PRThread *thread,
void (*start)(void *),
PRThreadPriority priority,
PRThreadScope scope,
PRThreadState state,
PRUint32 stackSize)
{
PRInt32 flags;
/* mask out SIGALRM for native thread creation */
thr_sigsetmask(SIG_BLOCK, &set, &oldset);
/*
* Note that we create joinable threads with the THR_DETACHED
* flag. The reasons why we don't use thr_join to implement
* PR_JoinThread are:
* - We use a termination condition variable in the PRThread
* structure to implement PR_JoinThread across all classic
* nspr implementation strategies.
* - The native threads may be recycled by NSPR to run other
* new NSPR threads, so the native threads may not terminate
* when the corresponding NSPR threads terminate.
*/
flags = THR_SUSPENDED|THR_DETACHED;
if (_PR_IS_GCABLE_THREAD(thread) || (thread->flags & _PR_BOUND_THREAD) ||
(scope == PR_GLOBAL_BOUND_THREAD))
flags |= THR_BOUND;
if (thr_create(NULL, thread->stack->stackSize,
(void *(*)(void *)) start, (void *) thread,
flags,
&thread->md.handle)) {
thr_sigsetmask(SIG_SETMASK, &oldset, NULL);
return PR_FAILURE;
}
/* When the thread starts running, then the lwpid is set to the right
* value. Until then we want to mark this as 'uninit' so that
* its register state is initialized properly for GC */
thread->md.lwpid = -1;
thr_sigsetmask(SIG_SETMASK, &oldset, NULL);
_MD_NEW_SEM(&thread->md.waiter_sem, 0);
if ((scope == PR_GLOBAL_THREAD) || (scope == PR_GLOBAL_BOUND_THREAD)) {
thread->flags |= _PR_GLOBAL_SCOPE;
}
_MD_SET_PRIORITY(&(thread->md), priority);
/* Activate the thread */
if (thr_continue( thread->md.handle ) ) {
return PR_FAILURE;
}
return PR_SUCCESS;
}
void _MD_cleanup_thread(PRThread *thread)
{
thread_t hdl;
hdl = thread->md.handle;
/*
** First, suspend the thread (unless it's the active one)
** Because we suspend it first, we don't have to use LOCK_SCHEDULER to
** prevent both of us modifying the thread structure at the same time.
*/
if ( thread != _PR_MD_CURRENT_THREAD() ) {
thr_suspend(hdl);
}
PR_LOG(_pr_thread_lm, PR_LOG_MIN,
("(0X%x)[DestroyThread]\n", thread));
_MD_DESTROY_SEM(&thread->md.waiter_sem);
}
void _MD_exit_thread(PRThread *thread)
{
_MD_CLEAN_THREAD(thread);
_MD_SET_CURRENT_THREAD(NULL);
}
void _MD_SET_PRIORITY(_MDThread *md_thread,
PRThreadPriority newPri)
{
PRIntn nativePri;
if (newPri < PR_PRIORITY_FIRST) {
newPri = PR_PRIORITY_FIRST;
} else if (newPri > PR_PRIORITY_LAST) {
newPri = PR_PRIORITY_LAST;
}
/* Solaris priorities are from 0 to 127 */
nativePri = newPri * 127 / PR_PRIORITY_LAST;
if(thr_setprio((thread_t)md_thread->handle, nativePri)) {
PR_LOG(_pr_thread_lm, PR_LOG_MIN,
("_PR_SetThreadPriority: can't set thread priority\n"));
}
}
void _MD_WAIT_CV(
struct _MDCVar *md_cv, struct _MDLock *md_lock, PRIntervalTime timeout)
{
struct timespec tt;
PRUint32 msec;
PRThread *me = _PR_MD_CURRENT_THREAD();
PR_ASSERT((!suspendAllOn) || (suspendAllThread != me));
if (PR_INTERVAL_NO_TIMEOUT == timeout) {
COND_WAIT(&md_cv->cv, &md_lock->lock);
} else {
msec = PR_IntervalToMilliseconds(timeout);
GETTIME(&tt);
tt.tv_sec += msec / PR_MSEC_PER_SEC;
tt.tv_nsec += (msec % PR_MSEC_PER_SEC) * PR_NSEC_PER_MSEC;
/* Check for nsec overflow - otherwise we'll get an EINVAL */
if (tt.tv_nsec >= PR_NSEC_PER_SEC) {
tt.tv_sec++;
tt.tv_nsec -= PR_NSEC_PER_SEC;
}
COND_TIMEDWAIT(&md_cv->cv, &md_lock->lock, &tt);
}
}
void _MD_lock(struct _MDLock *md_lock)
{
#ifdef DEBUG
/* This code was used for GC testing to make sure that we didn't attempt
* to grab any locks while threads are suspended.
*/
PRLock *lock;
if ((suspendAllOn) && (suspendAllThread == _PR_MD_CURRENT_THREAD())) {
lock = ((PRLock *) ((char*) (md_lock) - offsetof(PRLock,ilock)));
PR_ASSERT(lock->owner == NULL);
return;
}
#endif /* DEBUG */
mutex_lock(&md_lock->lock);
}
PRThread *_pr_attached_thread_tls()
{
PRThread *ret;
thr_getspecific(threadid_key, (void **)&ret);
return ret;
}
PRThread *_pr_current_thread_tls()
{
PRThread *thread;
thread = _MD_GET_ATTACHED_THREAD();
if (NULL == thread) {
thread = _PRI_AttachThread(
PR_USER_THREAD, PR_PRIORITY_NORMAL, NULL, 0);
}
PR_ASSERT(thread != NULL);
return thread;
}
PRStatus
_MD_wait(PRThread *thread, PRIntervalTime ticks)
{
_MD_WAIT_SEM(&thread->md.waiter_sem);
return PR_SUCCESS;
}
PRStatus
_MD_WakeupWaiter(PRThread *thread)
{
if (thread == NULL) {
return PR_SUCCESS;
}
_MD_POST_SEM(&thread->md.waiter_sem);
return PR_SUCCESS;
}
_PRCPU *_pr_current_cpu_tls()
{
_PRCPU *ret;
thr_getspecific(cpuid_key, (void **)&ret);
return ret;
}
PRThread *_pr_last_thread_tls()
{
PRThread *ret;
thr_getspecific(last_thread_key, (void **)&ret);
return ret;
}
_MDLock _pr_ioq_lock;
void
_MD_InitIO(void)
{
_MD_NEW_LOCK(&_pr_ioq_lock);
}
PRStatus _MD_InitializeThread(PRThread *thread)
{
if (!_PR_IS_NATIVE_THREAD(thread))
return PR_SUCCESS;
/* sol_curthread is an asm routine which grabs GR7; GR7 stores an internal
* thread structure ptr used by solaris. We'll use this ptr later
* with suspend/resume to find which threads are running on LWPs.
*/
thread->md.threadID = sol_curthread();
/* prime the sp; substract 4 so we don't hit the assert that
* curr sp > base_stack
*/
thread->md.sp = (uint_t) thread->stack->allocBase - sizeof(long);
thread->md.lwpid = _lwp_self();
thread->md.handle = THR_SELF();
/* all threads on Solaris are global threads from NSPR's perspective
* since all of them are mapped to Solaris threads.
*/
thread->flags |= _PR_GLOBAL_SCOPE;
/* For primordial/attached thread, we don't create an underlying native thread.
* So, _MD_CREATE_THREAD() does not get called. We need to do initialization
* like allocating thread's synchronization variables and set the underlying
* native thread's priority.
*/
if (thread->flags & (_PR_PRIMORDIAL | _PR_ATTACHED)) {
_MD_NEW_SEM(&thread->md.waiter_sem, 0);
_MD_SET_PRIORITY(&(thread->md), thread->priority);
}
return PR_SUCCESS;
}
/* Sleep for n milliseconds, n < 1000 */
void solaris_msec_sleep(int n)
{
struct timespec ts;
ts.tv_sec = 0;
ts.tv_nsec = 1000000*n;
if (syscall(SYS_nanosleep, &ts, 0, 0) < 0) {
PR_ASSERT(0);
}
}
#define VALID_SP(sp, bottom, top) \
(((uint_t)(sp)) > ((uint_t)(bottom)) && ((uint_t)(sp)) < ((uint_t)(top)))
void solaris_record_regs(PRThread *t, prstatus_t *lwpstatus)
{
#ifdef sparc
long *regs = (long *)&t->md.context.uc_mcontext.gregs[0];
PR_ASSERT(_PR_IS_GCABLE_THREAD(t));
PR_ASSERT(t->md.threadID == lwpstatus->pr_reg[REG_G7]);
t->md.sp = lwpstatus->pr_reg[REG_SP];
PR_ASSERT(VALID_SP(t->md.sp, t->stack->stackBottom, t->stack->stackTop));
regs[0] = lwpstatus->pr_reg[R_G1];
regs[1] = lwpstatus->pr_reg[R_G2];
regs[2] = lwpstatus->pr_reg[R_G3];
regs[3] = lwpstatus->pr_reg[R_G4];
regs[4] = lwpstatus->pr_reg[R_O0];
regs[5] = lwpstatus->pr_reg[R_O1];
regs[6] = lwpstatus->pr_reg[R_O2];
regs[7] = lwpstatus->pr_reg[R_O3];
regs[8] = lwpstatus->pr_reg[R_O4];
regs[9] = lwpstatus->pr_reg[R_O5];
regs[10] = lwpstatus->pr_reg[R_O6];
regs[11] = lwpstatus->pr_reg[R_O7];
#elif defined(i386)
/*
* To be implemented and tested
*/
PR_ASSERT(0);
PR_ASSERT(t->md.threadID == lwpstatus->pr_reg[GS]);
t->md.sp = lwpstatus->pr_reg[UESP];
#endif
}
void solaris_preempt_off()
{
sigset_t set;
(void)sigfillset(&set);
syscall(SYS_sigprocmask, SIG_SETMASK, &set, &old_mask);
}
void solaris_preempt_on()
{
syscall(SYS_sigprocmask, SIG_SETMASK, &old_mask, NULL);
}
int solaris_open_main_proc_fd()
{
char buf[30];
int fd;
/* Not locked, so must be created while threads coming up */
PR_snprintf(buf, sizeof(buf), "/proc/%ld", getpid());
if ( (fd = syscall(SYS_open, buf, O_RDONLY)) < 0) {
return -1;
}
return fd;
}
/* Return a file descriptor for the /proc entry corresponding to the
* given lwp.
*/
int solaris_open_lwp(lwpid_t id, int lwp_main_proc_fd)
{
int result;
if ( (result = syscall(SYS_ioctl, lwp_main_proc_fd, PIOCOPENLWP, &id)) <0)
return -1; /* exited??? */
return result;
}
void _MD_Begin_SuspendAll()
{
solaris_preempt_off();
PR_LOG(_pr_gc_lm, PR_LOG_ALWAYS, ("Begin_SuspendAll\n"));
/* run at highest prio so I cannot be preempted */
thr_getprio(thr_self(), &gcprio);
thr_setprio(thr_self(), 0x7fffffff);
suspendAllOn = PR_TRUE;
suspendAllThread = _PR_MD_CURRENT_THREAD();
}
void _MD_End_SuspendAll()
{
}
void _MD_End_ResumeAll()
{
PR_LOG(_pr_gc_lm, PR_LOG_ALWAYS, ("End_ResumeAll\n"));
thr_setprio(thr_self(), gcprio);
solaris_preempt_on();
suspendAllThread = NULL;
suspendAllOn = PR_FALSE;
}
void _MD_Suspend(PRThread *thr)
{
int lwp_fd, result;
prstatus_t lwpstatus;
int lwp_main_proc_fd = 0;
if (!_PR_IS_GCABLE_THREAD(thr) || !suspendAllOn){
/*XXX When the suspendAllOn is set, we will be trying to do lwp_suspend
* during that time we can't call any thread lib or libc calls. Hence
* make sure that no suspension is requested for Non gcable thread
* during suspendAllOn */
PR_ASSERT(!suspendAllOn);
thr_suspend(thr->md.handle);
return;
}
/* XXX Primordial thread can't be bound to an lwp, hence there is no
* way we can assume that we can get the lwp status for primordial
* thread reliably. Hence we skip this for primordial thread, hoping
* that the SP is saved during lock and cond. wait.
* XXX - Again this is concern only for java interpreter, not for the
* server, 'cause primordial thread in the server does not do java work
*/
if (thr->flags & _PR_PRIMORDIAL)
return;
/* XXX Important Note: If the start function of a thread is not called,
* lwpid is -1. Then, skip this thread. This thread will get caught
* in PR_NativeRunThread before calling the start function, because
* we hold the pr_activeLock during suspend/resume */
/* if the thread is not started yet then don't do anything */
if (!suspendAllOn || thr->md.lwpid == -1)
return;
if (_lwp_suspend(thr->md.lwpid) < 0) {
PR_ASSERT(0);
return;
}
if ( (lwp_main_proc_fd = solaris_open_main_proc_fd()) < 0) {
PR_ASSERT(0);
return; /* XXXMB ARGH, we're hosed! */
}
if ( (lwp_fd = solaris_open_lwp(thr->md.lwpid, lwp_main_proc_fd)) < 0) {
PR_ASSERT(0);
close(lwp_main_proc_fd);
return;
}
if ( (result = syscall(SYS_ioctl, lwp_fd, PIOCSTATUS, &lwpstatus)) < 0) {
/* Hopefully the thread just died... */
close(lwp_fd);
close(lwp_main_proc_fd);
return;
}
while ( !(lwpstatus.pr_flags & PR_STOPPED) ) {
if ( (result = syscall(SYS_ioctl, lwp_fd, PIOCSTATUS, &lwpstatus)) < 0) {
PR_ASSERT(0); /* ARGH SOMETHING WRONG! */
break;
}
solaris_msec_sleep(1);
}
solaris_record_regs(thr, &lwpstatus);
close(lwp_fd);
close(lwp_main_proc_fd);
}
#ifdef OLD_CODE
void _MD_SuspendAll()
{
/* On solaris there are threads, and there are LWPs.
* Calling _PR_DoSingleThread would freeze all of the threads bound to LWPs
* but not necessarily stop all LWPs (for example if someone did
* an attachthread of a thread which was not bound to an LWP).
* So now go through all the LWPs for this process and freeze them.
*
* Note that if any thread which is capable of having the GC run on it must
* had better be a LWP with a single bound thread on it. Otherwise, this
* might not stop that thread from being run.
*/
PRThread *current = _PR_MD_CURRENT_THREAD();
prstatus_t status, lwpstatus;
int result, index, lwp_fd;
lwpid_t me = _lwp_self();
int err;
int lwp_main_proc_fd;
solaris_preempt_off();
/* run at highest prio so I cannot be preempted */
thr_getprio(thr_self(), &gcprio);
thr_setprio(thr_self(), 0x7fffffff);
current->md.sp = (uint_t)&me; /* set my own stack pointer */
if ( (lwp_main_proc_fd = solaris_open_main_proc_fd()) < 0) {
PR_ASSERT(0);
solaris_preempt_on();
return; /* XXXMB ARGH, we're hosed! */
}
if ( (result = syscall(SYS_ioctl, lwp_main_proc_fd, PIOCSTATUS, &status)) < 0) {
err = errno;
PR_ASSERT(0);
goto failure; /* XXXMB ARGH, we're hosed! */
}
num_lwps = status.pr_nlwp;
if ( (all_lwps = (lwpid_t *)PR_MALLOC((num_lwps+1) * sizeof(lwpid_t)))==NULL) {
PR_ASSERT(0);
goto failure; /* XXXMB ARGH, we're hosed! */
}
if ( (result = syscall(SYS_ioctl, lwp_main_proc_fd, PIOCLWPIDS, all_lwps)) < 0) {
PR_ASSERT(0);
PR_DELETE(all_lwps);
goto failure; /* XXXMB ARGH, we're hosed! */
}
for (index=0; index< num_lwps; index++) {
if (all_lwps[index] != me) {
if (_lwp_suspend(all_lwps[index]) < 0) {
/* could happen if lwp exited */
all_lwps[index] = me; /* dummy it up */
}
}
}
/* Turns out that lwp_suspend is not a blocking call.
* Go through the list and make sure they are all stopped.
*/
for (index=0; index< num_lwps; index++) {
if (all_lwps[index] != me) {
if ( (lwp_fd = solaris_open_lwp(all_lwps[index], lwp_main_proc_fd)) < 0) {
PR_ASSERT(0);
PR_DELETE(all_lwps);
all_lwps = NULL;
goto failure; /* XXXMB ARGH, we're hosed! */
}
if ( (result = syscall(SYS_ioctl, lwp_fd, PIOCSTATUS, &lwpstatus)) < 0) {
/* Hopefully the thread just died... */
close(lwp_fd);
continue;
}
while ( !(lwpstatus.pr_flags & PR_STOPPED) ) {
if ( (result = syscall(SYS_ioctl, lwp_fd, PIOCSTATUS, &lwpstatus)) < 0) {
PR_ASSERT(0); /* ARGH SOMETHING WRONG! */
break;
}
solaris_msec_sleep(1);
}
solaris_record_regs(&lwpstatus);
close(lwp_fd);
}
}
close(lwp_main_proc_fd);
return;
failure:
solaris_preempt_on();
thr_setprio(thr_self(), gcprio);
close(lwp_main_proc_fd);
return;
}
void _MD_ResumeAll()
{
int i;
lwpid_t me = _lwp_self();
for (i=0; i < num_lwps; i++) {
if (all_lwps[i] == me)
continue;
if ( _lwp_continue(all_lwps[i]) < 0) {
PR_ASSERT(0); /* ARGH, we are hosed! */
}
}
/* restore priority and sigmask */
thr_setprio(thr_self(), gcprio);
solaris_preempt_on();
PR_DELETE(all_lwps);
all_lwps = NULL;
}
#endif /* OLD_CODE */
#ifdef USE_SETJMP
PRWord *_MD_HomeGCRegisters(PRThread *t, int isCurrent, int *np)
{
if (isCurrent) {
(void) setjmp(CONTEXT(t));
}
*np = sizeof(CONTEXT(t)) / sizeof(PRWord);
return (PRWord *) CONTEXT(t);
}
#else
PRWord *_MD_HomeGCRegisters(PRThread *t, PRIntn isCurrent, PRIntn *np)
{
if (isCurrent) {
(void) getcontext(CONTEXT(t));
}
*np = NGREG;
return (PRWord*) &t->md.context.uc_mcontext.gregs[0];
}
#endif /* USE_SETJMP */
#else /* _PR_GLOBAL_THREADS_ONLY */
#if defined(_PR_LOCAL_THREADS_ONLY)
void _MD_EarlyInit(void)
@ -860,8 +166,6 @@ PRWord *_MD_HomeGCRegisters(PRThread *t, PRIntn isCurrent, PRIntn *np)
#endif /* _PR_LOCAL_THREADS_ONLY */
#endif /* _PR_GLOBAL_THREADS_ONLY */
#ifndef _PR_PTHREADS
#if defined(i386) && defined(SOLARIS2_4)
/*

View File

@ -329,11 +329,7 @@ ifeq ($(OS_ARCH), SunOS)
endif
ifneq ($(LOCAL_THREADS_ONLY),1)
ifdef USE_PTHREADS
EXTRA_LIBS = -lpthread
else
EXTRA_LIBS = -lthread
endif
EXTRA_LIBS = -lpthread
endif # LOCAL_THREADS_ONLY
endif # SunOS

View File

@ -66,7 +66,7 @@
#include <stdlib.h>
static enum {
thread_nspr, thread_pthread, thread_uithread, thread_sproc, thread_win32
thread_nspr, thread_pthread, thread_sproc, thread_win32
} thread_provider;
typedef void (*StartFn)(void*);
@ -97,18 +97,6 @@ static void *pthread_start(void *arg)
} /* pthread_start */
#endif /* defined(_PR_PTHREADS) && !defined(_PR_DCETHREADS) */
#if defined(SOLARIS) && defined(_PR_GLOBAL_THREADS_ONLY)
#include <thread.h>
static void *uithread_start(void *arg)
{
StartFn start = ((StartObject*)arg)->start;
void *data = ((StartObject*)arg)->arg;
PR_Free(arg);
start(data);
return NULL;
} /* uithread_start */
#endif /* defined(SOLARIS) && defined(_PR_GLOBAL_THREADS_ONLY) */
#if defined(IRIX) && !defined(_PR_PTHREADS)
#include <sys/types.h>
#include <sys/prctl.h>
@ -182,29 +170,6 @@ static PRStatus CreateThread(StartFn start, void *arg)
break;
#endif /* defined(_PR_PTHREADS) && !defined(_PR_DCETHREADS) */
case thread_uithread:
#if defined(SOLARIS) && defined(_PR_GLOBAL_THREADS_ONLY)
{
int rv;
thread_t id;
long flags;
StartObject *start_object;
start_object = PR_NEW(StartObject);
PR_ASSERT(NULL != start_object);
start_object->start = start;
start_object->arg = arg;
flags = THR_DETACHED;
rv = thr_create(NULL, NULL, uithread_start, start_object, flags, &id);
return (0 == rv) ? PR_SUCCESS : PR_FAILURE;
}
#else
PR_SetError(PR_NOT_IMPLEMENTED_ERROR, 0);
rv = PR_FAILURE;
break;
#endif /* defined(SOLARIS) && defined(_PR_GLOBAL_THREADS_ONLY) */
case thread_sproc:
#if defined(IRIX) && !defined(_PR_PTHREADS)
{
@ -371,8 +336,6 @@ PRIntn main(PRIntn argc, char **argv)
thread_provider = thread_win32;
#elif defined(_PR_PTHREADS)
thread_provider = thread_pthread;
#elif defined(SOLARIS) && defined(_PR_GLOBAL_THREADS_ONLY)
thread_provider = thread_uithread;
#elif defined(IRIX)
thread_provider = thread_sproc;
#else

View File

@ -130,7 +130,7 @@ typedef enum Verbosity
} Verbosity;
static enum {
thread_nspr, thread_pthread, thread_uithread, thread_sproc, thread_win32
thread_nspr, thread_pthread, thread_sproc, thread_win32
} thread_provider;
static PRInt32 domain = AF_INET;
@ -659,20 +659,6 @@ static void *pthread_start(void *arg)
} /* pthread_start */
#endif /* defined(_PR_PTHREADS) && !defined(_PR_DCETHREADS) */
#if defined(SOLARIS) && defined(_PR_GLOBAL_THREADS_ONLY)
#include <thread.h>
static void *uithread_start(void *arg)
{
StartObject *so = (StartObject*)arg;
StartFn start = so->start;
void *data = so->arg;
PR_Free(so);
start(data);
return NULL;
} /* uithread_start */
#endif /* defined(SOLARIS) && defined(_PR_GLOBAL_THREADS_ONLY) */
#if defined(IRIX) && !defined(_PR_PTHREADS)
#include <sys/types.h>
#include <sys/prctl.h>
@ -713,11 +699,6 @@ static PRStatus JoinThread(PRThread *thread)
rv = PR_SUCCESS;
break;
#endif /* defined(_PR_PTHREADS) && !defined(_PR_DCETHREADS) */
case thread_uithread:
#if defined(SOLARIS) && defined(_PR_GLOBAL_THREADS_ONLY)
rv = PR_SUCCESS;
break;
#endif /* defined(SOLARIS) && defined(_PR_GLOBAL_THREADS_ONLY) */
case thread_win32:
#if defined(WIN32)
rv = PR_SUCCESS;
@ -777,29 +758,6 @@ static PRStatus NewThread(
#endif /* defined(_PR_PTHREADS) && !defined(_PR_DCETHREADS) */
break;
case thread_uithread:
#if defined(SOLARIS) && defined(_PR_GLOBAL_THREADS_ONLY)
{
int rv;
thread_t id;
long flags;
StartObject *start_object;
start_object = PR_NEW(StartObject);
PR_ASSERT(NULL != start_object);
start_object->start = start;
start_object->arg = arg;
flags = THR_DETACHED;
rv = thr_create(NULL, NULL, uithread_start, start_object, flags, &id);
return (0 == rv) ? PR_SUCCESS : PR_FAILURE;
}
#else
PR_SetError(PR_NOT_IMPLEMENTED_ERROR, 0);
rv = PR_FAILURE;
#endif /* defined(SOLARIS) && defined(_PR_GLOBAL_THREADS_ONLY) */
break;
case thread_sproc:
#if defined(IRIX) && !defined(_PR_PTHREADS)
{
@ -1110,7 +1068,7 @@ static void Help(void)
PR_fprintf(debug_out, "\t-e <seconds> duration of the test in seconds (10)\n");
PR_fprintf(debug_out, "\t-s <string> dsn name of server (localhost)\n");
PR_fprintf(debug_out, "\t-G use GLOBAL threads (LOCAL)\n");
PR_fprintf(debug_out, "\t-T <string> thread provider ('n' | 'p' | 'u' | 'w')(n)\n");
PR_fprintf(debug_out, "\t-T <string> thread provider ('n' | 'p' | 'w')(n)\n");
PR_fprintf(debug_out, "\t-X use XTP as transport (TCP)\n");
PR_fprintf(debug_out, "\t-6 Use IPv6 (IPv4)\n");
PR_fprintf(debug_out, "\t-v verbosity (accumulative) (0)\n");
@ -1162,8 +1120,6 @@ PRIntn main(PRIntn argc, char** argv)
thread_provider = thread_win32;
#elif defined(_PR_PTHREADS)
thread_provider = thread_pthread;
#elif defined(SOLARIS) && defined(_PR_GLOBAL_THREADS_ONLY)
thread_provider = thread_uithread;
#elif defined(IRIX)
thread_provider = thread_sproc;
#else
@ -1195,7 +1151,6 @@ PRIntn main(PRIntn argc, char** argv)
case 'T': /* the thread provider */
if ('n' == *opt->value) thread_provider = thread_nspr;
else if ('p' == *opt->value) thread_provider = thread_pthread;
else if ('u' == *opt->value) thread_provider = thread_uithread;
else if ('w' == *opt->value) thread_provider = thread_win32;
else {Help(); return 2; }
break;
@ -1424,8 +1379,6 @@ PRIntn main(PRIntn argc, char** argv)
thread_type = "\nWin32 Thread Statistics\n";
else if (thread_provider == thread_pthread)
thread_type = "\npthread Statistics\n";
else if (thread_provider == thread_uithread)
thread_type = "\nUnix International (UI) Thread Statistics\n";
else if (thread_provider == thread_sproc)
thread_type = "\nsproc Statistics\n";
else {

View File

@ -125,21 +125,6 @@ else
LDOPTS += -R $(PWD)/$(dist_libdir)
endif
endif
# SunOS 5.4 and 5.5 need to link with -lthread or -lpthread,
# even though we already linked with these system libraries
# when we built libnspr.so.
ifeq ($(OS_RELEASE), 5.4)
EXTRA_LIBS = -lthread
endif
ifeq ($(OS_RELEASE), 5.5)
ifdef USE_PTHREADS
EXTRA_LIBS = -lpthread
else
EXTRA_LIBS = -lthread
endif
endif
endif # SunOS
ifeq ($(OS_ARCH), NCR)