Is OSCompareAndSwap is immune to ABA problem like CMPXCHG8B?
Share
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
It all depends on the implementation. OSCompareAndSwap* is only an interface which guarantee an atomic CAS operator (if the CPU supports it).
For x86 this function for 64-bit is implemented as
so the answer for you probably is “yes”.