What (if any) is the C# equivalent of the x86 asm xchg instruction?
With that command, which imo is a genuine exchange (unlike Interlocked.Exchange), I
Interlocked.Exchange
According to MSDN, Interlocked.Exchange is atomic.
If it is not suitable for you, you could implement XCHG in an unsafe section using C/C++.