Home | History | Annotate | Download | only in libevent

Lines Matching defs:first

270  * Internal; requires lock.  The caller must fix up buf->last and buf->first
277 /* Find the first victim chain. It might be *last_with_datap */
298 EVUTIL_ASSERT(buf->last_with_datap == &buf->first);
299 EVUTIL_ASSERT(buf->first == NULL);
300 buf->first = buf->last = chain;
303 /* Find the first victim chain. It might be *last_with_datap */
359 buffer->last_with_datap = &buffer->first;
560 for (chain = buffer->first; chain != NULL; chain = next) {
614 chain = buf->first;
689 * be the first one with space in it. */
699 /* Advance 'firstchain' to the first chain with space in it. */
750 dst->first = NULL;
752 dst->last_with_datap = &(dst)->first;
757 * read-pinned chains. The first pinned chain is saved in first, and the
758 * last in last. If src has no read-pinned chains, first and last are set
761 PRESERVE_PINNED(struct evbuffer *src, struct evbuffer_chain **first,
769 *first = *last = NULL;
777 chain = *first = *pinned;
780 /* If there's data in the first pinned chain, we need to allocate
815 src->first = pinned;
817 src->last_with_datap = &src->first;
826 dst->first = src->first;
827 if (src->last_with_datap == &src->first)
828 dst->last_with_datap = &dst->first;
840 dst->last->next = src->first;
841 if (src->last_with_datap == &src->first)
854 src->last->next = dst->first;
855 dst->first = src->first;
858 if (src->last_with_datap == &(src)->first)
859 dst->last_with_datap = &dst->first;
862 } else if (dst->last_with_datap == &dst->first) {
894 evbuffer_free_all_chains(outbuf->first);
941 evbuffer_free_all_chains(outbuf->first);
979 for (chain = buf->first; chain != NULL; chain = next) {
991 for (chain = buf->first;
998 buf->last_with_datap = &buf->first;
1001 buf->last_with_datap = &buf->first;
1012 buf->first = chain;
1055 chain = buf->first;
1107 chain = previous = src->first;
1137 src->last_with_datap = &src->first;
1146 if (dst->first == NULL) {
1147 dst->first = src->first;
1149 *chp = src->first;
1153 src->first = chain;
1195 chain = buf->first;
1205 /* No need to pull up anything; the first size bytes are
1235 /* already have enough space in the first chain */
1249 buf->first = tmp;
1281 buf->last_with_datap = &buf->first;
1283 if (buf->first->next && buf->first->next->off)
1284 buf->last_with_datap = &buf->first->next;
1286 buf->last_with_datap = &buf->first;
1441 it._internal.chain = buffer->first;
1445 /* the eol_style determines our first stop character and how many
1652 chain = buf->first;
1697 buf->first = tmp;
1698 if (buf->last_with_datap == &buf->first)
1760 /* 'chain' now points to the first chain with writable space (if any)
1883 * space we have in the first n. */
1906 /* There wasn't enough space in the first n chains with space in
1920 /* (we would only set last_with_data if we added the first
1929 EVUTIL_ASSERT(chain == buf->first);
1958 buf->first = buf->last = tmp;
1959 buf->last_with_datap = &buf->first;
2026 @param chainp A pointer to a variable to hold the first chain we're
2047 /* Let firstchain be the first chain with any space on it */
2276 struct evbuffer_chain *chain = buffer->first;
2326 struct evbuffer_chain *chain = buffer->first;
2393 struct evbuffer_chain *chain = buffer->first;
2461 chain = buf->first;
2549 char first;
2558 chain = pos._internal.chain = buffer->first;
2568 first = what[0];
2574 p = memchr(start_at, first,
2631 chain = buffer->first;