From: Matt Benjamin Date: Tue, 23 Dec 2014 20:51:44 +0000 (-0500) Subject: Add intrusive list anchor for Message dispatch to Message. X-Git-Tag: v0.93~265^2~17 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=ef7e735559afaad9845d5c37dae12181204c876c;p=ceph.git Add intrusive list anchor for Message dispatch to Message. This is currently used by XioMessenger dispatch strategies, but could be extended to other Messenger types. Signed-off-by: Matt Benjamin --- diff --git a/src/msg/Message.h b/src/msg/Message.h index 62e65886cadd..87a23238d0cb 100644 --- a/src/msg/Message.h +++ b/src/msg/Message.h @@ -180,6 +180,8 @@ // abstract Message class +namespace bi = boost::intrusive; + class Message : public RefCountedObject { protected: ceph_msg_header header; // headerelope @@ -203,6 +205,8 @@ protected: uint32_t magic; + bi::list_member_hook<> dispatch_q; + public: class CompletionHook : public Context { protected: @@ -215,6 +219,11 @@ public: virtual ~CompletionHook() {} }; + typedef bi::list< Message, + bi::member_hook< Message, + bi::list_member_hook<>, + &Message::dispatch_q > > Queue; + protected: CompletionHook* completion_hook; // owned by Messenger