asalkeld/libqb — pull request #65 by jsgf (2013-04-24 00:23:35+00:00)
Title: Be more careful with memory ordering in ringbuffer.c

This is a proposed fix for libqb issue #64:
* use atomic ops for ringbuffer chunk magic and size, to make sure they're written and read in the right order
* put a barrier before qb_atomic_*_set, since their users expect it
* don't use atomic ops in socket, since it doesn't need them