summaryrefslogtreecommitdiff
path: root/op.c
diff options
context:
space:
mode:
authorHugo van der Sanden <hv@crypt.org>2000-10-28 19:41:12 +0100
committerJarkko Hietaniemi <jhi@iki.fi>2000-10-28 18:02:05 +0000
commitfcae944a9e9281b32a3f7123ffca88faf583908e (patch)
treef0477070fcc9ab45491c779c578e5b689c5adbae /op.c
parentb09defb630396853401b22a46e423bde3280c5f0 (diff)
downloadperl-fcae944a9e9281b32a3f7123ffca88faf583908e.tar.gz
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
Diffstat (limited to 'op.c')
-rw-r--r--op.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/op.c b/op.c
index 7d07da8c91..0ac906037d 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;