libgit2/libgit2 — pull request #1719 by arrbee (2013-07-11 18:24:41+00:00)
Title: Update git__swap threading primitive

Based on conversation with @ethomson, this PR proposes updating the `git__swap` threading helper function to use `__sync_lock_test_and_set` / `InterlockedExchangePointer` instead of using the compare-and-swap primitives in a counterintuitive manner.

This also fixes up some warnings about the differences between `volatile void **` and `void * volatile *`, and fixes a number of warnings that showed up in the 64-bit Windows build.