mozilla/rust — pull request #12079 by TheHydroImpulse (2014-02-07 00:32:29+00:00)
Title: Added Volatile Module.

This is the second attempt at submitted the PR (wrecked the last one #12063 trying to squash my commits).

As per the discussion on the previous PR:

* `VolatilePtr`'s `store` method will achieve ownership of the current data first. This will zero-out the memory; after which the new pointer will be written. The old data is then dropped (through an explicit `drop` call).
* Added comments for the module definition describing what volatile is, with references to LLVM's docs and wikipedia.
* Added comments describing the semantics of `VolatilePtr.take`.