I am debugging some code using a boost C++ library, which uses Windows InterlockedDecrement
and InterlockedIncrement
.
In the outputted assembly InterlockedIncrement uses LOCK INC
whereas the InterlockedDecrement uses LOCK XADD
.
Why do they not both use LOCK XADD
?
(This is on Win 7 64, 64-bit compiling and MSVC 11)