Lines Matching defs:changelist
52 #include "changelist-internal.h"
491 * signal using the changelist, of where its entry in the changelist is.
499 event_changelist_init(struct event_changelist *changelist)
501 changelist->changes = NULL;
502 changelist->changes_size = 0;
503 changelist->n_changes = 0;
525 /** Make sure that the changelist is consistent with the evmap structures. */
530 struct event_changelist *changelist = &base->changelist;
532 EVUTIL_ASSERT(changelist->changes_size >= changelist->n_changes);
533 for (i = 0; i < changelist->n_changes; ++i) {
534 struct event_change *c = &changelist->changes[i];
550 struct event_change *c = &changelist->changes[f->idxplus1 - 1];
560 event_changelist_remove_all(struct event_changelist *changelist,
567 for (i = 0; i < changelist->n_changes; ++i) {
568 struct event_change *ch = &changelist->changes[i];
575 changelist->n_changes = 0;
581 event_changelist_freemem(struct event_changelist *changelist)
583 if (changelist->changes)
584 mm_free(changelist->changes);
585 event_changelist_init(changelist); /* zero it all out. */
588 /** Increase the size of 'changelist' to hold more changes. */
590 event_changelist_grow(struct event_changelist *changelist)
594 if (changelist->changes_size < 64)
597 new_size = changelist->changes_size * 2;
599 new_changes = mm_realloc(changelist->changes,
605 changelist->changes = new_changes;
606 changelist->changes_size = new_size;
611 /** Return a pointer to the changelist entry for the file descriptor or signal
616 event_changelist_get_or_construct(struct event_changelist *changelist,
625 EVUTIL_ASSERT(changelist->n_changes <= changelist->changes_size);
627 if (changelist->n_changes == changelist->changes_size) {
628 if (event_changelist_grow(changelist) < 0)
632 idx = changelist->n_changes++;
633 change = &changelist->changes[idx];
640 change = &changelist->changes[fdinfo->idxplus1 - 1];
650 struct event_changelist *changelist = &base->changelist;
656 change = event_changelist_get_or_construct(changelist, fd, old, fdinfo);
681 struct event_changelist *changelist = &base->changelist;
686 change = event_changelist_get_or_construct(changelist, fd, old, fdinfo);