From: Alex Rousskov Date: Mon, 7 Jan 2013 19:44:59 +0000 (-0700) Subject: Synced with Ipc::StoreMap API changes. No functionality changes expected. X-Git-Tag: SQUID_3_5_0_1~444^2~80 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=10dc0fe6f4e458d6a73cd80099d285f3b6162f29;p=thirdparty%2Fsquid.git Synced with Ipc::StoreMap API changes. No functionality changes expected. --- diff --git a/src/MemStore.cc b/src/MemStore.cc index be88e20ed1..09c7155c7b 100644 --- a/src/MemStore.cc +++ b/src/MemStore.cc @@ -157,11 +157,11 @@ MemStore::get(const cache_key *key) // XXX: replace sfileno with a bigger word (sfileno is only for cache_dirs) sfileno index; - const Ipc::StoreMapSlot *const slot = map->openForReading(key, index); + const Ipc::StoreMapAnchor *const slot = map->openForReading(key, index); if (!slot) return NULL; - const Ipc::StoreMapSlot::Basics &basics = slot->basics; + const Ipc::StoreMapAnchor::Basics &basics = slot->basics; const MemStoreMap::Extras &extras = map->extras(index); // create a brand new store entry and initialize it with stored info @@ -197,7 +197,7 @@ MemStore::get(const cache_key *key) } debugs(20, 3, HERE << "mem-loading failed; freeing " << index); - map->free(index); // do not let others into the same trap + map->freeEntry(index); // do not let others into the same trap return NULL; } @@ -329,7 +329,7 @@ MemStore::keep(StoreEntry &e) } sfileno index = 0; - Ipc::StoreMapSlot *slot = map->openForWriting(reinterpret_cast(e.key), index); + Ipc::StoreMapAnchor *slot = map->openForWriting(reinterpret_cast(e.key), index); if (!slot) { debugs(20, 5, HERE << "No room in mem-cache map to index " << e); return; @@ -381,7 +381,7 @@ MemStore::copyToShm(StoreEntry &e, MemStoreMap::Extras &extras) } void -MemStore::cleanReadable(const sfileno fileno) +MemStore::noteFreeMapSlice(const sfileno fileno) { Ipc::Mem::PutPage(map->extras(fileno).page); theCurrentSize -= Ipc::Mem::PageSize(); diff --git a/src/MemStore.h b/src/MemStore.h index aca5c6d5b2..f24498be9b 100644 --- a/src/MemStore.h +++ b/src/MemStore.h @@ -53,7 +53,7 @@ protected: bool copyFromShm(StoreEntry &e, const MemStoreMap::Extras &extras); // Ipc::StoreMapCleaner API - virtual void cleanReadable(const sfileno fileno); + virtual void noteFreeMapSlice(const sfileno sliceId); private: MemStoreMap *map; ///< index of mem-cached entries