[m-rev.] Implement work-stealing

Peter Wang novalazy at gmail.com
Thu Dec 17 10:25:01 AEDT 2009


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?

> 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

Thanks for that.  Sorry about the delay.

Peter
--------------------------------------------------------------------------
mercury-reviews mailing list
Post messages to:       mercury-reviews at csse.unimelb.edu.au
Administrative Queries: owner-mercury-reviews at csse.unimelb.edu.au
Subscriptions:          mercury-reviews-request at csse.unimelb.edu.au
--------------------------------------------------------------------------



More information about the reviews mailing list