This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
pp_lock
authorArthur Bergman <arthur@contiller.se>
Wed, 15 Aug 2001 11:52:16 +0000 (13:52 +0200)
committerJarkko Hietaniemi <jhi@iki.fi>
Wed, 15 Aug 2001 12:27:41 +0000 (12:27 +0000)
Message-ID: <008401c1256f$f75a91b0$21000a0a@vogw2kdev>

p4raw-id: //depot/perl@11678

pp.c

diff --git a/pp.c b/pp.c
index 65b1f17..ee9d47e 100644 (file)
--- a/pp.c
+++ b/pp.c
@@ -4348,6 +4348,11 @@ PP(pp_lock)
 #ifdef USE_THREADS
     sv_lock(sv);
 #endif /* USE_THREADS */
+#ifdef USE_ITHREADS
+    shared_sv *ssv = Perl_sharedsv_find(aTHX_ sv);
+    if(ssv)
+        Perl_sharedsv_lock(aTHX_ ssv);
+#endif /* USE_ITHREADS */
     if (SvTYPE(retsv) == SVt_PVAV || SvTYPE(retsv) == SVt_PVHV
        || SvTYPE(retsv) == SVt_PVCV) {
        retsv = refto(retsv);