Lines Matching defs:lock
224 /* Requires that we hold the lock and a reference */
240 /* Requires that we hold the lock and a reference */
269 /* Requires that we hold the lock and a reference */
673 if (d->lock != r->lock)
742 * The buffers can share a lock with this bufferevent object,
743 * but the lock might be destroyed below. */
759 EVTHREAD_FREE_LOCK(bufev_private->lock,
766 * reference to it. We wait this long mainly in case our lock is
807 bufferevent_enable_locking_(struct bufferevent *bufev, void *lock)
814 if (BEV_UPCAST(bufev)->lock)
818 if (!lock && underlying && BEV_UPCAST(underlying)->lock) {
819 lock = BEV_UPCAST(underlying)->lock;
820 BEV_UPCAST(bufev)->lock = lock;
822 } else if (!lock) {
823 EVTHREAD_ALLOC_LOCK(lock, EVTHREAD_LOCKTYPE_RECURSIVE);
824 if (!lock)
826 BEV_UPCAST(bufev)->lock = lock;
829 BEV_UPCAST(bufev)->lock = lock;
832 evbuffer_enable_locking(bufev->input, lock);
833 evbuffer_enable_locking(bufev->output, lock);
835 if (underlying && !BEV_UPCAST(underlying)->lock)
836 bufferevent_enable_locking_(underlying, lock);