1/*
2 * Copyright 2009, Ingo Weinhold, ingo_weinhold@gmx.de.
3 * Distributed under the terms of the MIT License.
4 */
5#ifndef BLOCK_BUFFER_CACHE_KERNEL_H
6#define BLOCK_BUFFER_CACHE_KERNEL_H
7
8
9#include <lock.h>
10
11#include <package/hpkg/BlockBufferCacheImpl.h>
12#include <package/hpkg/BufferCache.h>
13
14
15using BPackageKit::BHPKG::BBufferCacheLockable;
16using BPackageKit::BHPKG::BPrivate::BlockBufferCacheImpl;
17
18
19class BlockBufferCacheKernel
20	: public BlockBufferCacheImpl, BBufferCacheLockable {
21public:
22								BlockBufferCacheKernel(size_t blockSize,
23									uint32 maxCachedBlocks);
24	virtual						~BlockBufferCacheKernel();
25
26	virtual	bool				Lock();
27	virtual	void				Unlock();
28
29private:
30			mutex				fLock;
31};
32
33
34#endif	// BLOCK_BUFFER_CACHE_KERNEL_H
35