summaryrefslogtreecommitdiff
path: root/sv.c
diff options
context:
space:
mode:
authorNicholas Clark <nick@ccl4.org>2009-04-19 20:04:09 +0100
committerNicholas Clark <nick@ccl4.org>2009-04-19 20:04:09 +0100
commit327014894ced3ae73d401ac084a318bdc616e5d8 (patch)
tree38dc79bc44d4a98dbb1d97a6c70a46fd847d702e /sv.c
parent8e7bc40f984b4f08395a1bcfe16b07c2d5539282 (diff)
downloadperl-327014894ced3ae73d401ac084a318bdc616e5d8.tar.gz
In the context of PERL_OLD_COPY_ON_WRITE, remove comments about global mutexes.
These would only have been relevant if running under 5005 threads, which is long dead.
Diffstat (limited to 'sv.c')
-rw-r--r--sv.c12
1 files changed, 0 insertions, 12 deletions
diff --git a/sv.c b/sv.c
index 68caa6d6aa..17371cba9a 100644
--- a/sv.c
+++ b/sv.c
@@ -4085,12 +4085,6 @@ Perl_sv_setsv_flags(pTHX_ SV *dstr, register SV* sstr, const I32 flags)
}
#ifdef PERL_OLD_COPY_ON_WRITE
if (!isSwipe) {
- /* I believe I should acquire a global SV mutex if
- it's a COW sv (not a shared hash key) to stop
- it going un copy-on-write.
- If the source SV has gone un copy on write between up there
- and down here, then (assert() that) it is of the correct
- form to make it copy on write again */
if ((sflags & (SVf_FAKE | SVf_READONLY))
!= (SVf_FAKE | SVf_READONLY)) {
SvREADONLY_on(sstr);
@@ -4133,7 +4127,6 @@ Perl_sv_setsv_flags(pTHX_ SV *dstr, register SV* sstr, const I32 flags)
SvCUR_set(dstr, cur);
SvREADONLY_on(dstr);
SvFAKE_on(dstr);
- /* Relesase a global SV mutex. */
}
else
{ /* Passes the swipe test. */
@@ -4537,7 +4530,6 @@ Perl_sv_force_normal_flags(pTHX_ register SV *const sv, const U32 flags)
#ifdef PERL_OLD_COPY_ON_WRITE
if (SvREADONLY(sv)) {
- /* At this point I believe I should acquire a global SV mutex. */
if (SvFAKE(sv)) {
const char * const pvx = SvPVX_const(sv);
const STRLEN len = SvLEN(sv);
@@ -4578,7 +4570,6 @@ Perl_sv_force_normal_flags(pTHX_ register SV *const sv, const U32 flags)
}
else if (IN_PERL_RUNTIME)
Perl_croak(aTHX_ "%s", PL_no_modify);
- /* At this point I believe that I can drop the global SV mutex. */
}
#else
if (SvREADONLY(sv)) {
@@ -5787,8 +5778,6 @@ Perl_sv_clear(pTHX_ register SV *const sv)
#ifdef PERL_OLD_COPY_ON_WRITE
else if (SvPVX_const(sv)) {
if (SvIsCOW(sv)) {
- /* I believe I need to grab the global SV mutex here and
- then recheck the COW status. */
if (DEBUG_C_TEST) {
PerlIO_printf(Perl_debug_log, "Copy on write: clear\n");
sv_dump(sv);
@@ -5799,7 +5788,6 @@ Perl_sv_clear(pTHX_ register SV *const sv)
unshare_hek(SvSHARED_HEK_FROM_PV(SvPVX_const(sv)));
}
- /* And drop it here. */
SvFAKE_off(sv);
} else if (SvLEN(sv)) {
Safefree(SvPVX_const(sv));