[m-rev.] for review: Enable thread-local allocation and parallel marking on more platforms.
Paul Bone
paul at bone.id.au
Wed Aug 13 09:49:23 AEST 2014
On Tue, Aug 12, 2014 at 05:56:50PM +1000, Peter Wang wrote:
> On Tue, 12 Aug 2014 17:20:45 +1000, Julien Fischer <jfischer at opturion.com> wrote:
> > diff --git a/runtime/mercury_memory_zones.c b/runtime/mercury_memory_zones.c
> > index 91f9f89..df418b6 100644
> > --- a/runtime/mercury_memory_zones.c
> > +++ b/runtime/mercury_memory_zones.c
> > @@ -514,7 +514,7 @@ MR_next_offset(void)
> >
> > old_counter = offset_counter;
> > new_counter = (old_counter + 1) % (CACHE_SLICES - 1);
> > -#if defined(MR_THREAD_SAFE)
> > +#if defined(MR_LL_PARALLEL_CONJ)
> > /*
> > ** The critical section here is really small, a CAS will work well.
> >
> > The macros protecting MR_compare_and_swap_int and friends do
> > not appear to be consistent. The declarations are protected by
> > MR_THREAD_SAFE
> > but the definitions by MR_LL_PARALLEL_CONJ.
>
> Atomic op primitives are applicable to high-level .par grades as well,
> even if we wouldn't use them as much, so MR_THREAD_SAFE should be
> correct.
Agreed.
--
Paul Bone
More information about the reviews
mailing list