]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
async/rdma: move RDMAStack::create_worker() to .cc
authorKefu Chai <kchai@redhat.com>
Wed, 24 Feb 2021 04:05:34 +0000 (12:05 +0800)
committeryite.gu <yitegu0@gmail.com>
Sun, 4 Feb 2024 03:20:53 +0000 (11:20 +0800)
to hide the implementation in .cc file, also speed up the compilation.

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

src/msg/async/rdma/RDMAStack.cc
src/msg/async/rdma/RDMAStack.h

index 49bafd0b4c3888630600ffe45871e26db311ee46..cf16bbf96d302a9eefdfb8a8fa7a98055aed7c2b 100644 (file)
@@ -800,6 +800,11 @@ RDMAStack::~RDMAStack()
   }
 }
 
+Worker* RDMAStack::create_worker(CephContext *c, unsigned worker_id)
+{
+  return new RDMAWorker(c, worker_id);
+}
+
 void RDMAStack::spawn_worker(unsigned i, std::function<void ()> &&func)
 {
   threads.resize(i+1);
index 8389fee8c70fa23f87d807a7d535ecdc4ccbbde2..39e8d3d8c1aac7e0c88345caa7adda3b1f356f59 100644 (file)
@@ -326,9 +326,7 @@ class RDMAStack : public NetworkStack {
 
   std::atomic<bool> fork_finished = {false};
 
-  virtual Worker* create_worker(CephContext *c, unsigned worker_id) override {
-    return new RDMAWorker(c, worker_id);
-  }
+  virtual Worker* create_worker(CephContext *c, unsigned worker_id) override;
 
  public:
   explicit RDMAStack(CephContext *cct);