diff options
author | Gurusamy Sarathy <gsar@cpan.org> | 1999-05-07 20:28:31 +0000 |
---|---|---|
committer | Gurusamy Sarathy <gsar@cpan.org> | 1999-05-07 20:28:31 +0000 |
commit | 28a8573f881e85e383be4ba96e6a3626f81ca78a (patch) | |
tree | f5e9721c014f4c294704450a9ebe138a6443a3a9 /util.c | |
parent | 515f54a10bf9dc39776304b933d5130f35699785 (diff) | |
download | perl-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.c | 6 |
1 files changed, 3 insertions, 3 deletions
@@ -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));) } |