untested c->go ring buffer code