[m-rev.] Implement work-stealing

Paul Bone pbone at csse.unimelb.edu.au
Thu Dec 17 12:33:23 AEDT 2009


On Thu, Dec 17, 2009 at 10:25:01AM +1100, Peter Wang wrote:
> On 2009-12-09, Paul Bone <pbone at csse.unimelb.edu.au> wrote:
> > 
> > Implement work stealing.
> 
> > Index: runtime/mercury_context.c
> > ===================================================================
> > RCS file: /home/mercury1/repository/mercury/runtime/mercury_context.c,v
> > retrieving revision 1.72
> > diff -u -p -b -r1.72 mercury_context.c
> > --- runtime/mercury_context.c	3 Dec 2009 05:28:00 -0000	1.72
> > +++ runtime/mercury_context.c	8 Dec 2009 22:36:52 -0000
> ...
> > +
> > +#elif defined(MR_WIN32)
> > +
> > +    const long          NANOSEC_PER_SEC = 1000000000L;
> > +    const long          NANOSEC_PER_MILLISEC = 1000000L;
> > +    struct _timeb       now;
> > +    MR_int_least64_t    nanosecs;
> > +
> > +    _ftime(&now);
> > +    timeout->tv_sec = now.time;
> > +    nanosecs = ((MR_int_least64_t) (msecs + now.millitm)) *
> > +ANOSEC_PER_MILLISEC;
> 
> Is this broken in commit or just the email?

Yes.  This was broken.  It's fixed now.

> > Index: runtime/mercury_thread.c
> > ===================================================================
> > RCS file: /home/mercury1/repository/mercury/runtime/mercury_thread.c,v
> > retrieving revision 1.37
> > diff -u -p -b -r1.37 mercury_thread.c
> > --- runtime/mercury_thread.c	3 Dec 2009 05:28:00 -0000	1.37
> > +++ runtime/mercury_thread.c	8 Dec 2009 23:40:49 -0000
> ...
> > @@ -212,6 +212,10 @@ MR_destroy_thread(void *eng0)
> >  #endif
> >  
> >  #if defined(MR_THREAD_SAFE)
> > +/*
> > +** XXX: maybe shese should only be conditionally compiled when MR_DEBUG_THREADS
> > +** is also set. - pbone 
> > +*/
> 
> these

Fixed.

> 
> Thanks for that.  Sorry about the delay.
> 

No problem, thanks.

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 489 bytes
Desc: Digital signature
URL: <http://lists.mercurylang.org/archives/reviews/attachments/20091217/d7bbf1b4/attachment.sig>


More information about the reviews mailing list