From: Gurusamy Sarathy Date: Sun, 25 Oct 1998 04:49:04 +0000 (+0000) Subject: avoid the circular refcnt logic in magic_mutexfree() X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=b03b9beb4aad24925326d26b7ad4ddf7ed2dbfea;p=p5sagit%2Fp5-mst-13.2.git avoid the circular refcnt logic in magic_mutexfree() p4raw-id: //depot/perl@2052 --- diff --git a/mg.c b/mg.c index f3fc7d7..49ad9be 100644 --- a/mg.c +++ b/mg.c @@ -2007,7 +2007,6 @@ magic_mutexfree(SV *sv, MAGIC *mg) croak("panic: magic_mutexfree"); MUTEX_DESTROY(MgMUTEXP(mg)); COND_DESTROY(MgCONDP(mg)); - SvREFCNT_dec(sv); return 0; } #endif /* USE_THREADS */ diff --git a/pp.c b/pp.c index 430e7a2..0bd3a23 100644 --- a/pp.c +++ b/pp.c @@ -4783,7 +4783,6 @@ PP(pp_lock) DEBUG_S(PerlIO_printf(PerlIO_stderr(), "0x%lx: pp_lock lock 0x%lx\n", (unsigned long)thr, (unsigned long)sv);) MUTEX_UNLOCK(MgMUTEXP(mg)); - SvREFCNT_inc(sv); /* keep alive until magic_mutexfree */ save_destructor(unlock_condpair, sv); } #endif /* USE_THREADS */ diff --git a/pp_hot.c b/pp_hot.c index 89bbba7..e59867e 100644 --- a/pp_hot.c +++ b/pp_hot.c @@ -2110,7 +2110,6 @@ PP(pp_entersub) DEBUG_S(PerlIO_printf(PerlIO_stderr(), "%p: pp_entersub lock %p\n", thr, sv);) MUTEX_UNLOCK(MgMUTEXP(mg)); - SvREFCNT_inc(sv); /* Keep alive until magic_mutexfree */ save_destructor(unlock_condpair, sv); } MUTEX_LOCK(CvMUTEXP(cv));