]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
msgr: get and put inside DispatchThread, not when you create/end DispatchThread
authorGreg Farnum <gregf@hq.newdream.net>
Thu, 7 Jan 2010 01:15:44 +0000 (17:15 -0800)
committerGreg Farnum <gregf@hq.newdream.net>
Thu, 7 Jan 2010 01:18:49 +0000 (17:18 -0800)
src/msg/SimpleMessenger.cc
src/msg/SimpleMessenger.h

index 3a49d257aadd0ca68eab18e33f43a43c32c81f8a..478440e6de2b229967b1bbc5dd8d202a840ae6f8 100644 (file)
@@ -352,7 +352,6 @@ void SimpleMessenger::ready()
 {
   dout(10) << "ready " << get_myaddr() << dendl;
   assert(!dispatch_thread.is_started());
-  get();
   dispatch_thread.create();
 }
 
index 8136981240c6238576229efde72b38110dee7c0b..975d797a9772daeb85295e23b934b016bebde6e7 100644 (file)
@@ -463,7 +463,9 @@ private:
   public:
     DispatchThread(SimpleMessenger *_rank) : rank(_rank) {}
     void *entry() {
+      rank->get();
       rank->dispatch_entry();
+      rank->put();
       return 0;
     }
   } dispatch_thread;