Why does Compare-And-Swap use Memory and Register
Why does the atomic swap instruction, which can be used to implement spin locks exchange data between a register and a memory location rather th开发者_运维问答an swapping two registers’ contents?
The point is to change the memory atomically, you gain nothing by just swapping registers around because they only hold temporary data anyway.
加载中,请稍侯......
精彩评论