2008-05-07

アトミックな読み書きについて

C++0xのAtomic operations libraryが、いまいち、よく理解できなかった。第一、この辺の用語からして理解ができない。happens beforeとかlock freeだとか、reorderingだとか。特に、29.1 Order and Consistencyがさっぱり理解できていなかったのだが、このブログを見て、疑問は多少解決した。

The Joys of Compiler and Processor Reordering
The Joys of Compiler and Processor Reordering: Why You Technically Need Read-Side Barriers
How Do KeMemoryBarrier and MemoryBarrier Prevent Compiler and Processor Reordering?

このブログ自体は、たまたま、Google ReaderのRecommendationsを眺めていて、目にとまったものだ。Windowsのカーネル周りをやってる人らしい。内容はとても分かりやすい。

No comments: