ARM bare-metal programming in D (cont) - volatile

Iain Buclaw ibuclaw at ubuntu.com
Thu Oct 24 06:05:49 PDT 2013


On 24 October 2013 12:22, eles <eles at eles.com> wrote:
> On Thursday, 24 October 2013 at 08:20:43 UTC, Iain Buclaw wrote:
>>
>> On 24 October 2013 08:18, Mike <none at none.com> wrote:
>>>
>>> On Thursday, 24 October 2013 at 06:37:08 UTC, Iain Buclaw wrote:
>>>>
>>>>
>>>> On 24 October 2013 06:37, Walter Bright <newshound2 at digitalmars.com>
>>>> wrote:
>>>>>
>>>>>
>>>>> On 10/23/2013 5:43 PM, Mike wrote:
>>
>> 'shared' guarantees that all reads and writes specified in source code
>> happen in the exact order specified with no omissions, as there may be
>> other threads reading/writing to the variable at the same time.
>
>
> All that's missing is a guarantee that the reading/writing actually occur at
> the intended address and not in some compiler cache.
>

The compiler does not cache shared data (at least in GDC).


-- 
Iain Buclaw

*(p < e ? p++ : p) = (c & 0x0f) + '0';


More information about the Digitalmars-d mailing list