1/* 2 * Copyright 2009, Ingo Weinhold, ingo_weinhold@gmx.de. 3 * Distributed under the terms of the MIT License. 4 */ 5 6 7#include "BlockBufferCacheKernel.h" 8 9 10BlockBufferCacheKernel::BlockBufferCacheKernel(size_t blockSize, 11 uint32 maxCachedBlocks) 12 : 13 BlockBufferCacheImpl(blockSize, maxCachedBlocks, this) 14{ 15 mutex_init(&fLock, "BlockBufferCache"); 16} 17 18 19BlockBufferCacheKernel::~BlockBufferCacheKernel() 20{ 21 mutex_destroy(&fLock); 22} 23 24 25bool 26BlockBufferCacheKernel::Lock() 27{ 28 mutex_lock(&fLock); 29 return true; 30} 31 32 33void 34BlockBufferCacheKernel::Unlock() 35{ 36 mutex_unlock(&fLock); 37} 38