summaryrefslogtreecommitdiffstats
path: root/libs/utils
diff options
context:
space:
mode:
authorJamie Gennis <jgennis@google.com>2011-10-30 18:10:41 -0700
committerAlex Ray <aray@google.com>2013-07-30 13:56:58 -0700
commit90f43dce840b2a815426b6bfcdbe5f92358ab956 (patch)
tree7c2ce777441fce483f62885c32c6b46181727a24 /libs/utils
parentb37fbe9f810545bf62468fea5958325caa3635be (diff)
downloadsystem_core-90f43dce840b2a815426b6bfcdbe5f92358ab956.zip
system_core-90f43dce840b2a815426b6bfcdbe5f92358ab956.tar.gz
system_core-90f43dce840b2a815426b6bfcdbe5f92358ab956.tar.bz2
BlobCache: remove the mutex locking
This change removes the mutex from the BlobCache class. The caller must be responsible for thread synchronization in order to properly implement the Flattenable interface, which is coming soon. Otherwise would be the potential for the cache contents to change between the call to the getFlattenedSize and flatten methods. Because the caller must do this synchronization anyway there's no reason to also some synchronization inside BlobCache. Change-Id: Ie1f4f6f82b78744f46a41ce863cac0cad276a20e
Diffstat (limited to 'libs/utils')
-rw-r--r--libs/utils/BlobCache.cpp2
1 files changed, 0 insertions, 2 deletions
diff --git a/libs/utils/BlobCache.cpp b/libs/utils/BlobCache.cpp
index 4039807..24fdca8 100644
--- a/libs/utils/BlobCache.cpp
+++ b/libs/utils/BlobCache.cpp
@@ -67,7 +67,6 @@ void BlobCache::set(const void* key, size_t keySize, const void* value,
return;
}
- Mutex::Autolock lock(mMutex);
sp<Blob> dummyKey(new Blob(key, keySize, false));
CacheEntry dummyEntry(dummyKey, NULL);
@@ -129,7 +128,6 @@ size_t BlobCache::get(const void* key, size_t keySize, void* value,
keySize, mMaxKeySize);
return 0;
}
- Mutex::Autolock lock(mMutex);
sp<Blob> dummyKey(new Blob(key, keySize, false));
CacheEntry dummyEntry(dummyKey, NULL);
ssize_t index = mCacheEntries.indexOf(dummyEntry);