I got this section of assembly code:
inline int CPP_Spinlock::TestAndSet (int* pTargetAddress, int nValue)
mov edx, dword ptr [pTargetAddress]
mov eax, nValue
lock xchg eax, dwrod ptr[edx]
I tried to understand what this section of code really does? However, took the course on assembly code over 10 years ago and I don't remember much now. Please give some help.
Thanks a lot,