summaryrefslogtreecommitdiff
path: root/pp.c
diff options
context:
space:
mode:
authorGurusamy Sarathy <gsar@cpan.org>2000-07-11 17:36:42 +0000
committerGurusamy Sarathy <gsar@cpan.org>2000-07-11 17:36:42 +0000
commit3d35f11b2518ea9ea787f5db97c6c3e7cff04dbf (patch)
tree734aa6592529265daf086a04e80910a6ed0c7650 /pp.c
parentf3b469aff5df6578898d16737a9550f4e9b8ee54 (diff)
downloadperl-3d35f11b2518ea9ea787f5db97c6c3e7cff04dbf.tar.gz
integrate cfgperl changes#6207..6210 into mainline
p4raw-link: @6210 on //depot/cfgperl: b8b4c9f3cf6ef09c878a80ff97526a69902a44ca p4raw-link: @6207 on //depot/cfgperl: b37a7757477319a5fcdd5131db15046064f631c4 p4raw-id: //depot/perl@6345
Diffstat (limited to 'pp.c')
-rw-r--r--pp.c19
1 files changed, 1 insertions, 18 deletions
diff --git a/pp.c b/pp.c
index fc3a4a723e..428b2e4760 100644
--- a/pp.c
+++ b/pp.c
@@ -5257,24 +5257,7 @@ PP(pp_lock)
dTOPss;
SV *retsv = sv;
#ifdef USE_THREADS
- MAGIC *mg;
-
- if (SvROK(sv))
- sv = SvRV(sv);
-
- mg = condpair_magic(sv);
- MUTEX_LOCK(MgMUTEXP(mg));
- if (MgOWNER(mg) == thr)
- MUTEX_UNLOCK(MgMUTEXP(mg));
- else {
- while (MgOWNER(mg))
- COND_WAIT(MgOWNERCONDP(mg), MgMUTEXP(mg));
- MgOWNER(mg) = thr;
- DEBUG_S(PerlIO_printf(Perl_debug_log, "0x%"UVxf": pp_lock lock 0x%"UVxf"\n",
- PTR2UV(thr), PTR2UV(sv));)
- MUTEX_UNLOCK(MgMUTEXP(mg));
- SAVEDESTRUCTOR_X(Perl_unlock_condpair, sv);
- }
+ Perl_lock(aTHX_ sv);
#endif /* USE_THREADS */
if (SvTYPE(retsv) == SVt_PVAV || SvTYPE(retsv) == SVt_PVHV
|| SvTYPE(retsv) == SVt_PVCV) {