From: Dave Mitchell Date: Sat, 26 Feb 2005 11:32:59 +0000 (+0000) Subject: ithreads: cond_signal() on a non-shared object coredumped X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=10532ef0bc83090a3acebb63693a4f506bd96830;p=p5sagit%2Fp5-mst-13.2.git ithreads: cond_signal() on a non-shared object coredumped p4raw-id: //depot/perl@23998 --- diff --git a/ext/threads/shared/shared.xs b/ext/threads/shared/shared.xs index 2d61d24..f922242 100644 --- a/ext/threads/shared/shared.xs +++ b/ext/threads/shared/shared.xs @@ -1237,11 +1237,11 @@ cond_signal_enabled(SV *ref) if(SvROK(ref)) ref = SvRV(ref); shared = Perl_sharedsv_find(aTHX_ ref); + if(!shared) + croak("cond_signal can only be used on shared values"); if (ckWARN(WARN_THREADS) && shared->lock.owner != aTHX) Perl_warner(aTHX_ packWARN(WARN_THREADS), "cond_signal() called on unlocked variable"); - if(!shared) - croak("cond_signal can only be used on shared values"); COND_SIGNAL(&shared->user_cond); void