]> git.ipfire.org Git - thirdparty/squid.git/commitdiff
Synced with Ipc::StoreMap API changes. No functionality changes expected.
authorAlex Rousskov <rousskov@measurement-factory.com>
Mon, 7 Jan 2013 19:44:59 +0000 (12:44 -0700)
committerAlex Rousskov <rousskov@measurement-factory.com>
Mon, 7 Jan 2013 19:44:59 +0000 (12:44 -0700)
src/MemStore.cc
src/MemStore.h

index be88e20ed120eec5b04409a91fb36de9df0d5548..09c7155c7bf35513594af67a0be16468092954b6 100644 (file)
@@ -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<const cache_key *>(e.key), index);
+    Ipc::StoreMapAnchor *slot = map->openForWriting(reinterpret_cast<const cache_key *>(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();
index aca5c6d5b2c8da2f2aa5b1557b2f169a749ed3c9..f24498be9b29a1ee9afc04af05e1e631cee653d8 100644 (file)
@@ -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