Search code examples
c++atomiccompare-and-swapload-link-store-conditional

compare-and-swap atomic operation vs Load-link/store-conditional operation


Under an x86 processor I am not sure of the difference between compare-and-swap atomic operation and Load-link/store-conditional operation. Is the latter safer than the former? Is it the case that the first is better than the second?


Solution

  • x86 does not provide LL/SC instructions. Check out wikipedia for platforms that do. Also see this SO question.