added matrix_ringbuf_exit