rtapi/ring.h: add memory barriers