Things to watch out for:
-1. The Configure in 5.005 is a hand-patched version of that supplied
- with perl5.004_74 or so. Most of the patches had to do with
- supporting MPE/iX and EBCDIC systems. I have re-integrated most
- of the changes back into metaconfig, but I don't really undertand
- why MPE/iX needed some of the patches, so I may have missed
- something important. I did try to flag questionable changes in
- the individual units.
- The Configure as generated in the 5.9.x branch leading towards
- 5.10, is also used exactly as is without changes in the 5.8.x
- and 5.6.x branches, so do not remove support for features that
- are availabvle in those branches, but are removed from devel (e.g.
- perl5005threads).
-
-2. Future support of better random number generators should probably
+1. Future support of better random number generators should probably
start with the randfunc.U unit included here. It's currently
broken, but well commented and probably a good place to start.
?RCS:
?RCS: $Log: usethreads.U,v $
?RCS:
-?MAKE:usethreads useithreads use5005threads d_oldpthreads usereentrant: \
+?MAKE:usethreads useithreads d_oldpthreads usereentrant: \
Myread Oldconfig Setvar test cat patchlevel
?MAKE: -pick add $@ %<
?Y:TOP
?S: and indicates that Perl should be built to use the interpreter-based
?S: threading implementation.
?S:.
-?S:use5005threads:
-?S: This variable conditionally defines the USE_5005THREADS symbol,
-?S: and indicates that Perl should be built to use the 5.005-based
-?S: threading implementation. Only valid up to 5.8.x.
-?S:.
?X: I'm putting old_pthreads in this unit because it might eventually
?X: be part of an automatic determination to see if we can use threads
?X: at all.
?C: This symbol, if defined, indicates that Perl should be built to
?C: use the interpreter-based threading implementation.
?C:.
-?C:USE_5005THREADS:
-?C: This symbol, if defined, indicates that Perl should be built to
-?C: use the 5.005-based threading implementation.
-?C: Only valid up to 5.8.x.
-?C:.
?C:USE_THREADS:
?C: This symbol, if defined, indicates that Perl should
?C: be built to use threads. At present, it is a synonym for
-?C: USE_5005THREADS for perl older than 5.8 and USE_ITHREADS
-?C: for 5.8.x and newer, but eventually the source ought to be
+?C: and USE_ITHREADS, but eventually the source ought to be
?C: changed to use this to mean _any_ threading implementation.
?C:.
?C:OLD_PTHREADS_API:
?C: try to use the various _r versions of library functions.
?C: This is extremely experimental.
?C:.
-?H:#$use5005threads USE_5005THREADS /**/
?H:#$useithreads USE_ITHREADS /**/
-?H:?%<:#if defined(USE_5005THREADS) && !defined(USE_ITHREADS)
-?H:?%<:#define USE_THREADS /* until src is revised*/
-?H:?%<:#endif
+?H:#$usethreads USE_THREADS /**/
?H:#$d_oldpthreads OLD_PTHREADS_API /**/
?H:#$usereentrant USE_REENTRANT_API /**/
?H:.
-?X: [hmb] Removed LINT for use5005threads, useithreads, and
-?X: usereentrant, as LINT is only run on blead
?LINT:set usethreads d_oldpthreads
?INIT:: set usethreads on the Configure command line to enable threads.
?INIT:usereentrant='undef'
?X: automatic setting of sensible defaults.
case "$usethreads" in
$define|true|[yY]*) dflt='y';;
-*) # Catch case where user specified ithreads or 5005threads but
+*) # Catch case where user specified ithreads but
# forgot -Dusethreads (A.D. 4/2002)
- case "$useithreads$use5005threads" in
+ case "$useithreads" in
*$define*) dflt='y';;
*) dflt='n';;
esac
set usethreads
eval $setvar
-if $test $patchlevel -lt 9; then
- case "$usethreads" in
- $define)
- : Default to ithreads unless overridden on command line or with
- : old config.sh
- dflt='y'
- case "$use5005threads" in
- $define|true|[yY]*)
- echo "5.005 threads are no longer supported"
- exit 1
- ;;
- esac
- case "$useithreads" in
- $undef|false|[nN]*) dflt='n';;
- esac
- rp='Use the newer interpreter-based ithreads?'
- . ./myread
- case "$ans" in
- y|Y) val="$define" ;;
- *) val="$undef" ;;
- esac
- set useithreads
- eval $setvar
- : Now set use5005threads to the opposite value.
- case "$useithreads" in
- $define) val="$undef" ;;
- *) val="$define" ;;
- esac
- set use5005threads
- eval $setvar
- ;;
- *)
- useithreads="$undef"
- use5005threads="$undef"
- ;;
- esac
-
-?X: This is not supposed to be possible but with some trickery, maybe.
- case "$useithreads$use5005threads" in
- "$define$define")
- $cat >&4 <<EOM
-
-You cannot have both the ithreads and the 5.005 threads enabled
-at the same time. Disabling the 5.005 threads since they are
-much less stable than the ithreads.
-
-EOM
- use5005threads="$undef"
- ;;
- esac
-
-else
-: perl-5.9.x and later
-
- if test X"$usethreads" = "X$define"; then
- case "$use5005threads" in
- $define|true|[yY]*)
- $cat >&4 <<EOM
-
-5.005 threads has been removed for 5.10. Perl will be built using ithreads.
-
-EOM
- ;;
- esac
- fi
-
- use5005threads="$undef"
- useithreads="$usethreads"
-fi
+useithreads="$usethreads"
?X: Check out what kind of threads API we have
case "$d_oldpthreads" in