From 2c127b02ff4eadd06aea091d9656b587d56177f6 Mon Sep 17 00:00:00 2001 From: Malcolm Beattie Date: Thu, 24 Jul 1997 14:57:53 +0000 Subject: [PATCH] Start support for fake threads. pp_lock now returns its argument. p4raw-id: //depot/perlext/Thread@41 --- Thread.xs | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) diff --git a/Thread.xs b/Thread.xs index e131745..e0730d8 100644 --- a/Thread.xs +++ b/Thread.xs @@ -119,7 +119,7 @@ AV *initargs; XPUSHs(SvREFCNT_inc(startsv)); PUTBACK; - New(53, threadstart_mutexp, 1, pthread_mutex_t); + New(53, threadstart_mutexp, 1, perl_mutex); /* On your marks... */ MUTEX_INIT(threadstart_mutexp); MUTEX_LOCK(threadstart_mutexp); @@ -242,13 +242,9 @@ cond_wait(sv) SV * sv MAGIC * mg = NO_INIT CODE: - if (SvROK(sv)) { - /* - * Kludge to allow lock of real objects without requiring - * to pass in every type of argument by explicit reference. - */ + if (SvROK(sv)) sv = SvRV(sv); - } + mg = condpair_magic(sv); DEBUG_L(fprintf(stderr, "0x%lx: cond_wait 0x%lx\n", (unsigned long)thr, (unsigned long)sv)); -- 2.7.4