]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
msg/async: do not pass worker id to Stack::spawn_worker()
authorKefu Chai <kchai@redhat.com>
Wed, 24 Feb 2021 04:44:47 +0000 (12:44 +0800)
committeryite.gu <yitegu0@gmail.com>
Sun, 4 Feb 2024 03:23:40 +0000 (11:23 +0800)
this parameter is not used anymore.

Signed-off-by: Kefu Chai <kchai@redhat.com>
(cherry picked from commit 2ecaa16673f018b3472d640b16a66500c7d3012f)

src/msg/async/PosixStack.h
src/msg/async/Stack.h
src/msg/async/dpdk/DPDKStack.cc
src/msg/async/dpdk/DPDKStack.h
src/msg/async/rdma/RDMAStack.cc
src/msg/async/rdma/RDMAStack.h

index fba45c06bd6f40cb2a357407af089e4f76684f77..a4ff65b28f466e5d2ec65c4cc3e3cad445d65a02 100644 (file)
@@ -47,7 +47,7 @@ class PosixNetworkStack : public NetworkStack {
  public:
   explicit PosixNetworkStack(CephContext *c);
 
-  void spawn_worker(unsigned i, std::function<void ()> &&func) override {
+  void spawn_worker(std::function<void ()> &&func) override {
     threads.emplace_back(std::move(func));
   }
   void join_worker(unsigned i) override {
index c5114ce37d0e0adfdb3c51f655ed0ae0d6814614..855527bfdb8d7bbb25d35c0f92e238594ccb8db1 100644 (file)
@@ -338,7 +338,7 @@ class NetworkStack {
   }
 
   // direct is used in tests only
-  virtual void spawn_worker(unsigned i, std::function<void ()> &&) = 0;
+  virtual void spawn_worker(std::function<void ()> &&) = 0;
   virtual void join_worker(unsigned i) = 0;
 
   virtual bool is_ready() { return true; };
index f177673942603bbb6f81b4a6c45502e8a1657787..2bfe45e9b44c31a285f644654492070a1c666a49 100644 (file)
@@ -242,7 +242,7 @@ int DPDKWorker::connect(const entity_addr_t &addr, const SocketOptions &opts, Co
   return r;
 }
 
-void DPDKStack::spawn_worker(unsigned i, std::function<void ()> &&func)
+void DPDKStack::spawn_worker(std::function<void ()> &&func)
 {
   // create a extra master thread
   //
index 8a1f0089978c72b3d5edf2161859c34a8ad20613..ad264a8495b80e00faca1e38cc458d9e3b05cc1a 100644 (file)
@@ -258,7 +258,7 @@ class DPDKStack : public NetworkStack {
   {}
   virtual bool support_local_listen_table() const override { return true; }
 
-  virtual void spawn_worker(unsigned i, std::function<void ()> &&func) override;
+  virtual void spawn_worker(std::function<void ()> &&func) override;
   virtual void join_worker(unsigned i) override;
 };
 
index f6f0a65f650e76674b4644c8f1a58f76ed871f54..ef246a6e1a3ed8ee003565dd5bc1f7b8d7484065 100644 (file)
@@ -801,7 +801,7 @@ Worker* RDMAStack::create_worker(CephContext *c, unsigned worker_id)
   return w;
 }
 
-void RDMAStack::spawn_worker(unsigned i, std::function<void ()> &&func)
+void RDMAStack::spawn_worker(std::function<void ()> &&func)
 {
   threads.emplace_back(std::move(func));
 }
index 39e8d3d8c1aac7e0c88345caa7adda3b1f356f59..aa64ca57e6faebe69270db32d8473c4017309fb8 100644 (file)
@@ -333,7 +333,7 @@ class RDMAStack : public NetworkStack {
   virtual ~RDMAStack();
   virtual bool nonblock_connect_need_writable_event() const override { return false; }
 
-  virtual void spawn_worker(unsigned i, std::function<void ()> &&func) override;
+  virtual void spawn_worker(std::function<void ()> &&func) override;
   virtual void join_worker(unsigned i) override;
   virtual bool is_ready() override { return fork_finished.load(); };
   virtual void ready() override { fork_finished = true; };