GregBowyer/softheap — pull request #11 by Zarkantho (2014-09-17 00:10:30+00:00)
Title: First pass at fixing concurrency issue

This is the patch using CAS instead of the load store sequence. Do you think I should use a packed C struct instead of these macros?

I do think this is equivalent to the other method, except for the fact that in this one the writers (I believe) will have slightly more contention, since they will cause each other to fail the CAS. This may end up being the same amount of contention as the contention to just increment the value, and in any case it doesn't seem obviously slower.