Re: Native version of VolatileRead and VolatileWrite
Peter Ritchie <[email protected]> Wed, 12 Dec 2007 00:43:35 -0500
| Newsgroups | gmane.comp.windows.devel.dotnet.cx |
|---|---|
| Message-ID | <LISTSERV%[email protected]> |
Both VolatileRead/Write and InterockExchange are atomic and perform an implicit memory barrier. VolatileRead/Write an CompareExchange accomplish the same thing. What are you trying to accomplish? The call to Thread.VolatileWrite in C# should be: Int32 val; Thread.VolatileWrite(ref val, valueToWrite). The call to VolatileRead should also not use the C++ scope resolution operator; but other than that :-). =================================== This list is hosted by DevelopMentorĀ® http://www.develop.com View archives and manage your subscription(s) at http://discuss.develop.com