]> git.ipfire.org Git - thirdparty/squid.git/blobdiff - src/ipc/mem/Pages.cc
Docs: Copyright updates for 2018 (#114)
[thirdparty/squid.git] / src / ipc / mem / Pages.cc
index 51d65dd10cafa7bfa52447a387291c720e485570..57df37d8e5f8a26d2b9ae5e4fee24c7215a93d27 100644 (file)
@@ -1,14 +1,18 @@
 /*
- * DEBUG: section 54    Interprocess Communication
+ * Copyright (C) 1996-2018 The Squid Software Foundation and contributors
  *
+ * Squid software is distributed under GPLv2+ license and includes
+ * contributions from numerous individuals and organizations.
+ * Please see the COPYING and CONTRIBUTORS files for details.
  */
 
+/* DEBUG: section 54    Interprocess Communication */
+
 #include "squid.h"
 #include "base/RunnersRegistry.h"
 #include "base/TextException.h"
 #include "ipc/mem/PagePool.h"
 #include "ipc/mem/Pages.h"
-#include "SwapDir.h"
 #include "tools.h"
 
 // Uses a single PagePool instance, for now.
@@ -90,28 +94,28 @@ class SharedMemPagesRr: public Ipc::Mem::RegisteredRunner
 public:
     /* RegisteredRunner API */
     SharedMemPagesRr(): owner(NULL) {}
-    virtual void run(const RunnerRegistry &);
-    virtual void create(const RunnerRegistry &);
-    virtual void open(const RunnerRegistry &);
+    virtual void useConfig();
+    virtual void create();
+    virtual void open();
     virtual ~SharedMemPagesRr();
 
 private:
     Ipc::Mem::PagePool::Owner *owner;
 };
 
-RunnerRegistrationEntry(rrAfterConfig, SharedMemPagesRr);
+RunnerRegistrationEntry(SharedMemPagesRr);
 
 void
-SharedMemPagesRr::run(const RunnerRegistry &r)
+SharedMemPagesRr::useConfig()
 {
     if (Ipc::Mem::PageLimit() <= 0)
         return;
 
-    Ipc::Mem::RegisteredRunner::run(r);
+    Ipc::Mem::RegisteredRunner::useConfig();
 }
 
 void
-SharedMemPagesRr::create(const RunnerRegistry &)
+SharedMemPagesRr::create()
 {
     Must(!owner);
     owner = Ipc::Mem::PagePool::Init(PagePoolId, Ipc::Mem::PageLimit(),
@@ -119,7 +123,7 @@ SharedMemPagesRr::create(const RunnerRegistry &)
 }
 
 void
-SharedMemPagesRr::open(const RunnerRegistry &)
+SharedMemPagesRr::open()
 {
     Must(!ThePagePool);
     ThePagePool = new Ipc::Mem::PagePool(PagePoolId);
@@ -127,10 +131,8 @@ SharedMemPagesRr::open(const RunnerRegistry &)
 
 SharedMemPagesRr::~SharedMemPagesRr()
 {
-    if (!UsingSmp())
-        return;
-
     delete ThePagePool;
     ThePagePool = NULL;
     delete owner;
 }
+