summaryrefslogtreecommitdiff
path: root/util.c
diff options
context:
space:
mode:
authorGurusamy Sarathy <gsar@cpan.org>1999-05-07 20:28:31 +0000
committerGurusamy Sarathy <gsar@cpan.org>1999-05-07 20:28:31 +0000
commit28a8573f881e85e383be4ba96e6a3626f81ca78a (patch)
treef5e9721c014f4c294704450a9ebe138a6443a3a9 /util.c
parent515f54a10bf9dc39776304b933d5130f35699785 (diff)
downloadperl-28a8573f881e85e383be4ba96e6a3626f81ca78a.tar.gz
avoid using PL_sv_mutex in condpair_magic() (avoids hangs when
intervening code has to allocate SVs) p4raw-id: //depot/perl@3324
Diffstat (limited to 'util.c')
-rw-r--r--util.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/util.c b/util.c
index 3db5b0255f..f39ccd1dcb 100644
--- a/util.c
+++ b/util.c
@@ -2824,11 +2824,11 @@ condpair_magic(SV *sv)
COND_INIT(&cp->owner_cond);
COND_INIT(&cp->cond);
cp->owner = 0;
- LOCK_SV_MUTEX;
+ MUTEX_LOCK(&PL_cred_mutex); /* XXX need separate mutex? */
mg = mg_find(sv, 'm');
if (mg) {
/* someone else beat us to initialising it */
- UNLOCK_SV_MUTEX;
+ MUTEX_UNLOCK(&PL_cred_mutex); /* XXX need separate mutex? */
MUTEX_DESTROY(&cp->mutex);
COND_DESTROY(&cp->owner_cond);
COND_DESTROY(&cp->cond);
@@ -2839,7 +2839,7 @@ condpair_magic(SV *sv)
mg = SvMAGIC(sv);
mg->mg_ptr = (char *)cp;
mg->mg_len = sizeof(cp);
- UNLOCK_SV_MUTEX;
+ MUTEX_UNLOCK(&PL_cred_mutex); /* XXX need separate mutex? */
DEBUG_S(WITH_THR(PerlIO_printf(PerlIO_stderr(),
"%p: condpair_magic %p\n", thr, sv));)
}