This protects against race conditions. We can now preset the first two bytes which are used for size and flags by the COM module (currently the only user of the ringbuffer module).