Lines Matching refs:changelist
53 #include "changelist-internal.h"
689 * signal using the changelist, of where its entry in the changelist is.
697 event_changelist_init_(struct event_changelist *changelist)
699 changelist->changes = NULL;
700 changelist->changes_size = 0;
701 changelist->n_changes = 0;
728 struct event_changelist *changelist = &base->changelist;
733 struct event_change *c = &changelist->changes[f->idxplus1 - 1];
739 /** Make sure that the changelist is consistent with the evmap structures. */
744 struct event_changelist *changelist = &base->changelist;
746 EVUTIL_ASSERT(changelist->changes_size >= changelist->n_changes);
747 for (i = 0; i < changelist->n_changes; ++i) {
748 struct event_change *c = &changelist->changes[i];
768 event_changelist_remove_all_(struct event_changelist *changelist,
775 for (i = 0; i < changelist->n_changes; ++i) {
776 struct event_change *ch = &changelist->changes[i];
783 changelist->n_changes = 0;
789 event_changelist_freemem_(struct event_changelist *changelist)
791 if (changelist->changes)
792 mm_free(changelist->changes);
793 event_changelist_init_(changelist); /* zero it all out. */
796 /** Increase the size of 'changelist' to hold more changes. */
798 event_changelist_grow(struct event_changelist *changelist)
802 if (changelist->changes_size < 64)
805 new_size = changelist->changes_size * 2;
807 new_changes = mm_realloc(changelist->changes,
813 changelist->changes = new_changes;
814 changelist->changes_size = new_size;
819 /** Return a pointer to the changelist entry for the file descriptor or signal
824 event_changelist_get_or_construct(struct event_changelist *changelist,
833 EVUTIL_ASSERT(changelist->n_changes <= changelist->changes_size);
835 if (changelist->n_changes == changelist->changes_size) {
836 if (event_changelist_grow(changelist) < 0)
840 idx = changelist->n_changes++;
841 change = &changelist->changes[idx];
848 change = &changelist->changes[fdinfo->idxplus1 - 1];
858 struct event_changelist *changelist = &base->changelist;
864 change = event_changelist_get_or_construct(changelist, fd, old, fdinfo);
893 struct event_changelist *changelist = &base->changelist;
898 change = event_changelist_get_or_construct(changelist, fd, old, fdinfo);