1#ifndef BUFFER_POOL_H 2#define BUFFER_POOL_H 3/* BufferPool - a buffer pool for uncached file access 4** 5** Initial version by Axel Dörfler, axeld@pinc-software.de 6** This file may be used under the terms of the OpenBeOS License. 7*/ 8 9 10#include <OS.h> 11 12 13class BufferPool { 14 public: 15 BufferPool(); 16 ~BufferPool(); 17 18 status_t InitCheck(); 19 20 status_t RequestBuffers(uint32 blockSize); 21 status_t ReleaseBuffers(); 22 23 status_t GetBuffer(void **_buffer); 24 status_t PutBuffer(void *buffer); 25 26 private: 27 sem_id fLock, fFreeBuffers; 28 void **fFirstFree; 29}; 30 31#endif /* BUFFER_POOL_H */ 32