why do we return the "current_value" regardless of whether or not we reset the value at "location"? Wouldn't we want to return the value at "location" if we updated it?
I need more explanation, because I don't have much knowledge How is CAS atomic? There are multiple operations in the title itself - read, compare and set new value
At hardware level (Intel CPU) there is an atomic instruction for the compare-and-exchange operation. INSTRUCTION SET REFERENCE, A-L, 3-208 Vol. 2A "CMPXCHG-Compare and Exchange" part of Intel® 64 and IA-32 Architectures Software Developer’s Manual Volume 2 (2A, 2B, 2C, & 2D): Instruction Set Reference, A-Z.
Nice explanation
Nice approach
why do we return the "current_value" regardless of whether or not we reset the value at "location"? Wouldn't we want to return the value at "location" if we updated it?
I think that the returned value is used to check that the CAS operation succeeded (current_value == old_value).
I need more explanation, because I don't have much knowledge
How is CAS atomic? There are multiple operations in the title itself - read, compare and set new value
At hardware level (Intel CPU) there is an atomic instruction for the compare-and-exchange operation.
INSTRUCTION SET REFERENCE, A-L, 3-208 Vol. 2A
"CMPXCHG-Compare and Exchange"
part of
Intel® 64 and IA-32 Architectures Software Developer’s Manual
Volume 2 (2A, 2B, 2C, & 2D): Instruction Set Reference, A-Z.
Why does every thread wait for the log? Thanks !
Is data structures finished here ???? Sir
thanks!
my whole attention was on how this amazing person is writing backwards/mirrored (whatever it is called). Good explanation though.
He's not🤣
He writes forwards facing us, and then it is mirrored in processing afterwards to compensate.
Is this good playlist