status_t RingBuffer::CreateBuffer() { if (fBuffer != NULL) return B_OK; fBuffer = create_ring_buffer(PIPEFS_MAX_BUFFER_SIZE); return fBuffer != NULL ? B_OK : B_NO_MEMORY; }
status_t RingBuffer::CreateBuffer() { if (fBuffer != NULL) return B_OK; fBuffer = create_ring_buffer(VFS_FIFO_BUFFER_CAPACITY); return fBuffer != NULL ? B_OK : B_NO_MEMORY; }
RingBuffer::RingBuffer(size_t size) { fBuffer = create_ring_buffer(size); fLock = create_sem(1, "ring buffer lock"); }