[m-rev.] for review: Enable thread-local allocation and parallel marking on more platforms.
jfischer at opturion.com
Wed Aug 13 14:14:26 AEST 2014
On Tue, 12 Aug 2014, 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
>> 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,
I don't think the high-level .par grades currently use them at all.
> so MR_THREAD_SAFE should be correct.
In principle, yes. I'll change the runtime around so the atomic ops
are defined if MR_THREAD_SAFE is defined for now.
More information about the reviews