From: Hugo van der Sanden Date: Sat, 28 Oct 2000 18:41:12 +0000 (+0100) Subject: Locking null mutexes is not recommendable. X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=fcae944a9e9281b32a3f7123ffca88faf583908e;p=p5sagit%2Fp5-mst-13.2.git Locking null mutexes is not recommendable. Subject: Re: [ID 20001027.008] Not OK: perl v5.7.0 +DEVEL7462 on i386-freebsd-thread-64all 4.1-stable (UNINSTALLED) Message-Id: <200010281741.SAA31327@crypt.compulink.co.uk> p4raw-id: //depot/perl@7473 --- diff --git a/op.c b/op.c index 7d07da8..0ac9060 100644 --- a/op.c +++ b/op.c @@ -4557,6 +4557,11 @@ Perl_newATTRSUB(pTHX_ I32 floor, OP *o, OP *proto, OP *attrs, OP *block) SvREFCNT_inc(const_sv); if (cv) { cv_undef(cv); +#ifdef USE_THREADS + New(666, CvMUTEXP(cv), 1, perl_mutex); + MUTEX_INIT(CvMUTEXP(cv)); + CvOWNER(cv) = 0; +#endif /* USE_THREADS */ sv_setpv((SV*)cv, ""); /* prototype is "" */ CvXSUBANY(cv).any_ptr = const_sv; CvXSUB(cv) = const_sv_xsub;