From: Malcolm Beattie Date: Thu, 24 Jul 1997 14:57:53 +0000 (+0000) Subject: Start support for fake threads. X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=2c127b02ff4eadd06aea091d9656b587d56177f6;p=p5sagit%2Fp5-mst-13.2.git Start support for fake threads. pp_lock now returns its argument. p4raw-id: //depot/perlext/Thread@41 --- 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));