C's volatile garantee that the compiler will not promote the variable to a register and doo all memory read write in order.<br><br>This is mandatory if you want to interface with some memory mapped device for instance.<br>

<br>This has nothing to do with concurency.<br><br><div class="gmail_quote">2012/7/25 Walter Bright <span dir="ltr"><<a href="mailto:walter@digitalmars.com" target="_blank">walter@digitalmars.com</a>></span><br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">

<div class="im"><br>
On 7/24/2012 2:53 PM, Alex Rønne Petersen wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
But shared can't replace volatile in kernel space. shared means atomics/memory fences which is not what I want - that would just give me unnecessary overhead. I want the proper, standard C semantics of volatile,<br>
</blockquote>
<br></div>
C does not have Standard semantics for volatile. It's a giant mess.<div class="im"><br>
<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
not the atomicity that people seem to associate with it.<br>
</blockquote>
<br></div>
Exactly what semantics are you looking for?<div class="im"><br>
<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
Besides, shared isn't even implemented yet - how can it actually be called a valid replacement for volatile at all, at this point?<br>
</blockquote>
<br></div>
D volatile isn't implemented, either.<div class="im"><br>
<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
It seems amazing to me that volatile was deprecated in favor of something that isn't actually implemented (and even more amazing that the error message points to a feature that doesn't do the same thing)... Note that I'm writing actual kernel code here. I need something that actually works or I can't reliably write this code in D...<br>


</blockquote>
<br></div>
I need to know what you're looking for.<div class="HOEnZb"><div class="h5"><br>
<br>
______________________________<u></u>_________________<br>
dmd-internals mailing list<br>
<a href="mailto:dmd-internals@puremagic.com" target="_blank">dmd-internals@puremagic.com</a><br>
<a href="http://lists.puremagic.com/mailman/listinfo/dmd-internals" target="_blank">http://lists.puremagic.com/<u></u>mailman/listinfo/dmd-internals</a><br>
</div></div></blockquote></div><br>