J
Jon Skeet [C# MVP]
On Jun 22, 6:04 am, "Peter Ritchie [C#MVP]" <[email protected]>
wrote:
I don't have time to reply to everything right now (and replying to
large posts with a web browser is annoying anyway) but I've found the
information which confirms what I was saying about Vance:
http://discuss.develop.com/archives/wa.exe?A2=ind0203B&L=DOTNET&P=R375&I=-3
I mailed Vance at the time to clarify how exactly things were
guaranteed, and he came back with a reply which is *either* word for
word *or* my summary (I've just found this from a 4 year old post I
made reporting back) - bear in mind this is the previous version of
the spec, hence the numbering changes:
<quote>
Section 11.6.7 makes guarantees about volatile reads/writes,
effectively
making them memory barriers.
Section 11.6.5 (last paragraph) states that acquiring a lock
implicitly
performs a volatile read operation, and releasing a lock implicitly
performs a volatile write operation.
The two in conjunction make the appropriate guarantees.
</quote>
Jon
wrote:
If the MS x86 JIT does not in fact optimize member fields to fulfil
that/those particular guarantee(s), that really just substantiates my
assertion that the spec. is unclear and that your rebuttal is intepretive.
It's also a bit contradictory to information you've said you received from
Vance and Chris. No offence or implication that you didn't receive that
information; just that it seems contradictory, if it's indeed true that the
JIT doesn't optimize member fields and therefore does not need to look for
Enter/Exit...
I don't have time to reply to everything right now (and replying to
large posts with a web browser is annoying anyway) but I've found the
information which confirms what I was saying about Vance:
http://discuss.develop.com/archives/wa.exe?A2=ind0203B&L=DOTNET&P=R375&I=-3
I mailed Vance at the time to clarify how exactly things were
guaranteed, and he came back with a reply which is *either* word for
word *or* my summary (I've just found this from a 4 year old post I
made reporting back) - bear in mind this is the previous version of
the spec, hence the numbering changes:
<quote>
Section 11.6.7 makes guarantees about volatile reads/writes,
effectively
making them memory barriers.
Section 11.6.5 (last paragraph) states that acquiring a lock
implicitly
performs a volatile read operation, and releasing a lock implicitly
performs a volatile write operation.
The two in conjunction make the appropriate guarantees.
</quote>
Jon