inline detail::listener* get_actor_ptr(adl::actor_id const& aid, ctxid_t ctxid, timestamp_t timestamp) { GCE_ASSERT(!in_pool(aid))(aid); detail::listener* ret = 0; if (ctxid == aid.ctxid_ && timestamp == aid.timestamp_ && aid.uintptr_ != 0) { ret = (detail::listener*)aid.uintptr_; } return ret; }
inline detail::actor_index get_actor_index(adl::actor_id const& aid, ctxid_t ctxid, timestamp_t timestamp) { detail::actor_index ret; GCE_ASSERT(in_pool(aid))(aid); if (ctxid == aid.ctxid_ && timestamp == aid.timestamp_) { ret.id_ = aid.uintptr_; ret.svc_id_ = aid.svc_id_; ret.type_ = (detail::actor_type)aid.type_; } return ret; }
inline std::string to_string(adl::actor_id const& o) { std::string str; str += "aid<"; str += to_string(o.ctxid_); str += "."; str += boost::lexical_cast<intbuf_t>(o.timestamp_).cbegin(); str += "."; str += boost::lexical_cast<intbuf_t>(o.uintptr_).cbegin(); str += "."; if (in_pool(o)) { str += boost::lexical_cast<intbuf_t>(o.svc_id_).cbegin(); str += "."; str += boost::lexical_cast<intbuf_t>((int)o.type_).cbegin(); str += "."; } str += boost::lexical_cast<intbuf_t>(o.sid_).cbegin(); str += "."; str += to_string(o.svc_); str += ">"; return str; }
static bool in_cache(struct mq_policy *mq, struct entry *e) { return in_pool(&mq->cache_pool, e); }