Lines Matching refs:bev
46 struct bufferevent_private bev; member
56 upcast(struct bufferevent *bev) in upcast() argument
59 if (bev->be_ops != &bufferevent_ops_pair) in upcast()
61 bev_p = EVUTIL_UPCAST(bev, struct bufferevent_pair, bev.bev); in upcast()
62 EVUTIL_ASSERT(bev_p->bev.bev.be_ops == &bufferevent_ops_pair); in upcast()
66 #define downcast(bev_pair) (&(bev_pair)->bev.bev)
99 if (bufferevent_init_common_(&bufev->bev, base, &bufferevent_ops_pair, in bufferevent_pair_elt_new()
104 if (!evbuffer_add_cb(bufev->bev.bev.output, be_pair_outbuf_cb, bufev)) { in bufferevent_pair_elt_new()
109 bufferevent_init_generic_timeout_cbs_(&bufev->bev.bev); in bufferevent_pair_elt_new()
135 bufferevent_enable_locking_(downcast(bufev2), bufev1->bev.lock); in bufferevent_pair_new()
200 !dst->bev.read_suspended && in be_pair_wants_to_talk()
253 be_pair_disable(struct bufferevent *bev, short events) in be_pair_disable() argument
256 BEV_DEL_GENERIC_READ_TIMEOUT(bev); in be_pair_disable()
259 BEV_DEL_GENERIC_WRITE_TIMEOUT(bev); in be_pair_disable()
265 be_pair_unlink(struct bufferevent *bev) in be_pair_unlink() argument
267 struct bufferevent_pair *bev_p = upcast(bev); in be_pair_unlink()
278 be_pair_destruct(struct bufferevent *bev) in be_pair_destruct() argument
280 struct bufferevent_pair *bev_p = upcast(bev); in be_pair_destruct()
297 if (bev_p->unlinked_partner && bev_p->bev.own_lock) { in be_pair_destruct()
298 bev_p->unlinked_partner->bev.own_lock = 1; in be_pair_destruct()
299 bev_p->bev.own_lock = 0; in be_pair_destruct()
305 be_pair_flush(struct bufferevent *bev, short iotype, in be_pair_flush() argument
308 struct bufferevent_pair *bev_p = upcast(bev); in be_pair_flush()
317 incref_and_lock(bev); in be_pair_flush()
322 be_pair_transfer(partner, bev, 1); in be_pair_flush()
325 be_pair_transfer(bev, partner, 1); in be_pair_flush()
335 decref_and_unlock(bev); in be_pair_flush()
340 bufferevent_pair_get_partner(struct bufferevent *bev) in bufferevent_pair_get_partner() argument
344 bev_p = upcast(bev); in bufferevent_pair_get_partner()
348 incref_and_lock(bev); in bufferevent_pair_get_partner()
351 decref_and_unlock(bev); in bufferevent_pair_get_partner()
357 evutil_offsetof(struct bufferevent_pair, bev.bev),