add ringbuffer register func