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

Timo Sintonen t.sintonen at luukku.com
Sat Oct 26 05:49:30 PDT 2013


On Saturday, 26 October 2013 at 11:43:02 UTC, Johannes Pfau wrote:
> Am Fri, 25 Oct 2013 21:16:29 +0200
> schrieb "Timo Sintonen" <t.sintonen at luukku.com>:
>
>> On Friday, 25 October 2013 at 18:12:40 UTC, Johannes Pfau 
>> wrote:
>> > What's wrong with the solution Iain mentioned, i.e the way 
>> > shared
>> > is implemented in GDC?
>> >
>> > http://forum.dlang.org/thread/bifrvifzrhgocrejepvc@forum.dlang.org?page=4#post-mailman.2475.1382646532.1719.digitalmars-d:40puremagic.com
>> > http://forum.dlang.org/thread/bifrvifzrhgocrejepvc@forum.dlang.org?page=4#post-mailman.2480.1382655175.1719.digitalmars-d:40puremagic.com
>> 
>> There is nothing wrong if it works.
>> When I last time discussed about this with you and Iain, I do 
>> not remember if this was mentioned. I have been on belief that 
>> gdc has no solution.
>
> Yes, this was news to me as well.
>> 
>> The second thing is, as I mentioned, that register access is 
>> such an important feature in system language that it should be 
>> in language specs.
>> 
>> A quick search did not bring any documentation about shared in 
>> general and how gdc version is different. TDPL mentions only 
>> that shared guarantees the order of operations but does not 
>> mention anything about volatility.
>> Can anybody point to any documentation?
>
> Well to be honest I don't think there's any kind of spec 
> related to
> shared. This is still a very unspecified / fragile part of the 
> language.
>
> (I totally agree though that it should be specified)

Seems to work. I can make every member as shared or the whole 
struct. Not yet tested how it works with property functions or 
when there are tables or structs as members, but now I get 
forward in my work.

A little bit sad that the honored leader of the language still 
thinks that the right way to go is what we did with Commodore 
64...


More information about the Digitalmars-d mailing list