On Friday, 25 October 2013 at 18:12:40 UTC, Johannes Pfau wrote:
Am Fri, 25 Oct 2013 17:20:23 +0200
schrieb "Timo Sintonen" <t.sinto...@luukku.com>:
It seems that it is two different things here. As far as I
understand, sharing means something like 'somebody may change
my data' and volatility is something like 'I have to know
immediately if the data is changed'. It has become obvious
that these two are not easy to fit together and make a working
model.
The original question in this thread was to have a proper way
to access hardware registers. So far, even the top people have
offered only workarounds. I wonder how long D can be marketed
as system language if it does not have a defined and reliable
way to access system hardware.
Register access occurs often in time critical places like
interrupt routines. A library routine or external function is
not a choice. Whatever the feature is, it has to be built in
the language. I don't care if it is related to variables,
blocks or files as long as I do not have to put these files in
a separate directory like I do now.
I would like to hear more what would be the options. Then we
could make a decision what is the right way to go.
What's wrong with the solution Iain mentioned, i.e the way
shared
is implemented in GDC?
http://forum.dlang.org/thread/bifrvifzrhgocreje...@forum.dlang.org?page=4#post-mailman.2475.1382646532.1719.digitalmars-d:40puremagic.com
http://forum.dlang.org/thread/bifrvifzrhgocreje...@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.
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?