Change 30110 by [EMAIL PROTECTED] on 2007/02/03 19:00:21
Clarify that all the dire (sounding) "unsafe" warnings apply to 5005
threads.
Affected files ...
... //depot/maint-5.8/perl/gv.c#98 edit
... //depot/maint-5.8/perl/op.c#195 edit
... //depot/maint-5.8/perl/perl.c#200 edit
... //depot/maint-5.8/perl/sv.c#339 edit
Differences ...
==== //depot/maint-5.8/perl/gv.c#98 (text) ====
Index: perl/gv.c
--- perl/gv.c#97~30057~ 2007-01-29 07:55:07.000000000 -0800
+++ perl/gv.c 2007-02-03 11:00:21.000000000 -0800
@@ -225,7 +225,7 @@
/* newCONSTSUB takes ownership of the reference from us. */
GvCV(gv) = newCONSTSUB(stash, (char *)name, has_constant);
} else {
- /* XXX unsafe for threads if eval_owner isn't held */
+ /* XXX unsafe for 5005 threads if eval_owner isn't held */
(void) start_subparse(0,0); /* Create empty CV in compcv. */
GvCV(gv) = PL_compcv;
}
==== //depot/maint-5.8/perl/op.c#195 (text) ====
Index: perl/op.c
--- perl/op.c#194~30102~ 2007-02-02 14:11:03.000000000 -0800
+++ perl/op.c 2007-02-03 11:00:21.000000000 -0800
@@ -4675,7 +4675,7 @@
return cv;
}
-/* XXX unsafe for threads if eval_owner isn't held */
+/* XXX unsafe for 5005 threads if eval_owner isn't held */
/*
=for apidoc newCONSTSUB
==== //depot/maint-5.8/perl/perl.c#200 (text) ====
Index: perl/perl.c
--- perl/perl.c#199~30107~ 2007-02-03 10:08:37.000000000 -0800
+++ perl/perl.c 2007-02-03 11:00:21.000000000 -0800
@@ -2580,7 +2580,7 @@
Perl_get_cv(pTHX_ const char *name, I32 create)
{
GV* const gv = gv_fetchpv(name, create, SVt_PVCV);
- /* XXX unsafe for threads if eval_owner isn't held */
+ /* XXX unsafe for 5005 threads if eval_owner isn't held */
/* XXX this is probably not what they think they're getting.
* It has the same effect as "sub name;", i.e. just a forward
* declaration! */
==== //depot/maint-5.8/perl/sv.c#339 (text) ====
Index: perl/sv.c
--- perl/sv.c#338~30107~ 2007-02-03 10:08:37.000000000 -0800
+++ perl/sv.c 2007-02-03 11:00:21.000000000 -0800
@@ -99,7 +99,7 @@
Manipulation of any of the PL_*root pointers is protected by enclosing
LOCK_SV_MUTEX; ... UNLOCK_SV_MUTEX calls which should Do the Right Thing
-if threads are enabled.
+if 5005 threads are enabled.
The function visit() scans the SV arenas list, and calls a specified
function for each SV it finds which is still live - ie which has an SvTYPE
@@ -152,7 +152,7 @@
/*
* nice_chunk and nice_chunk size need to be set
- * and queried under the protection of sv_mutex
+ * and queried under the protection of sv_mutex for 5005 threads
*/
void
Perl_offer_nice_chunk(pTHX_ void *chunk, U32 chunk_size)
@@ -180,7 +180,7 @@
--PL_sv_count; \
} STMT_END
-/* sv_mutex must be held while calling uproot_SV() */
+/* sv_mutex must be held while calling uproot_SV() for 5005 threads */
#define uproot_SV(p) \
STMT_START { \
(p) = PL_sv_root; \
@@ -191,7 +191,7 @@
/* make some more SVs by adding another arena */
-/* sv_mutex must be held while calling more_sv() */
+/* sv_mutex must be held while calling more_sv() for 5005 threads */
STATIC SV*
S_more_sv(pTHX)
{
End of Patch.