summaryrefslogtreecommitdiff
path: root/util.c
diff options
context:
space:
mode:
authorGurusamy Sarathy <gsar@cpan.org>1998-02-03 03:45:09 +0000
committerGurusamy Sarathy <gsar@cpan.org>1998-02-03 03:45:09 +0000
commit43a861f1c4418d63c6d99fbecb816d11ccf25793 (patch)
tree5e372c082dfbfb4e786c379f5a2897f797cd270f /util.c
parent423d68ab98265bbd73b2ade2438378d2784c6e8c (diff)
parente7f07268aa53c62dd99727c5a996618d28697a90 (diff)
downloadperl-43a861f1c4418d63c6d99fbecb816d11ccf25793.tar.gz
[win32] integrate mainline
p4raw-id: //depot/win32/perl@455
Diffstat (limited to 'util.c')
-rw-r--r--util.c11
1 files changed, 4 insertions, 7 deletions
diff --git a/util.c b/util.c
index 31827b0f7f..dc0f4405d5 100644
--- a/util.c
+++ b/util.c
@@ -57,10 +57,6 @@
static void xstat _((void));
#endif
-#ifdef USE_THREADS
-static U32 threadnum = 0;
-#endif /* USE_THREADS */
-
#ifndef MYMALLOC
/* paranoid version of malloc */
@@ -2444,11 +2440,11 @@ condpair_magic(SV *sv)
COND_INIT(&cp->owner_cond);
COND_INIT(&cp->cond);
cp->owner = 0;
- MUTEX_LOCK(&sv_mutex);
+ LOCK_SV_MUTEX;
mg = mg_find(sv, 'm');
if (mg) {
/* someone else beat us to initialising it */
- MUTEX_UNLOCK(&sv_mutex);
+ UNLOCK_SV_MUTEX;
MUTEX_DESTROY(&cp->mutex);
COND_DESTROY(&cp->owner_cond);
COND_DESTROY(&cp->cond);
@@ -2459,7 +2455,7 @@ condpair_magic(SV *sv)
mg = SvMAGIC(sv);
mg->mg_ptr = (char *)cp;
mg->mg_len = sizeof(cp);
- MUTEX_UNLOCK(&sv_mutex);
+ UNLOCK_SV_MUTEX;
DEBUG_L(WITH_THR(PerlIO_printf(PerlIO_stderr(),
"%p: condpair_magic %p\n", thr, sv));)
}
@@ -2553,6 +2549,7 @@ new_struct_thread(struct perl_thread *t)
"new_struct_thread: copied threadsv %d %p->%p\n",i, t, thr));
}
}
+ thr->threadsvp = AvARRAY(thr->threadsv);
MUTEX_LOCK(&threads_mutex);
nthreads++;