opensubscriber
   Find in this group all groups
 
Unknown more information…

d : dotnet-cx@discuss.develop.com 12 December 2007 • 9:58AM -0500

Native version of VolatileRead and VolatileWrite
by Alex Ivanoff

REPLY TO AUTHOR
 
REPLY TO GROUP




It is a bit off-topic, but I hoped you would not mind. Is the following correct?

C#:

Int32 val = Thread::VolatileRead(ref valueToRead);

C++:

long val;
::InterlockedExchange(&val, valueToRead);



C#:

Int32 val;
Thread::VolatileWrite(&val, valueToWrite);

C++:

long val;
::InterlockedExchange(&val, valueToWrite);

Bookmark with:

Delicious   Digg   reddit   Facebook   StumbleUpon

Related Messages

opensubscriber is not affiliated with the authors of this message nor responsible for its content.