Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
スピンロックを実装するために使用できるアトミックスワップ命令が、2つのレジスタの内容をスワップするのではなく、レジスタとメモリ位置の間でデータを交換するのはなぜですか?
重要なのは、メモリをアトミックに変更することです。とにかく一時データしか保持しないため、レジスタを入れ替えるだけでは何も得られません。