From: Zbigniew Jędrzejewski-Szmek Date: Wed, 29 Jun 2022 12:21:12 +0000 (+0200) Subject: sd-event: rename field to indicate that it's a list X-Git-Tag: v252-rc1~728^2~4 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=0601b95877b24aae9e025155dd34c341cad2bab5;p=thirdparty%2Fsystemd.git sd-event: rename field to indicate that it's a list --- diff --git a/src/libsystemd/sd-event/sd-event.c b/src/libsystemd/sd-event/sd-event.c index c842c840515..3a6e0e81884 100644 --- a/src/libsystemd/sd-event/sd-event.c +++ b/src/libsystemd/sd-event/sd-event.c @@ -126,7 +126,7 @@ struct sd_event { LIST_HEAD(struct inode_data, inode_data_to_close); /* A list of inotify objects that already have events buffered which aren't processed yet */ - LIST_HEAD(struct inotify_data, inotify_data_buffered); + LIST_HEAD(struct inotify_data, buffered_inotify_data_list); pid_t original_pid; @@ -1690,7 +1690,7 @@ static void event_free_inotify_data(sd_event *e, struct inotify_data *d) { assert(hashmap_isempty(d->wd)); if (d->buffer_filled > 0) - LIST_REMOVE(buffered, e->inotify_data_buffered, d); + LIST_REMOVE(buffered, e->buffered_inotify_data_list, d); hashmap_free(d->inodes); hashmap_free(d->wd); @@ -3408,7 +3408,7 @@ static int event_inotify_data_read(sd_event *e, struct inotify_data *d, uint32_t assert(n > 0); d->buffer_filled = (size_t) n; - LIST_PREPEND(buffered, e->inotify_data_buffered, d); + LIST_PREPEND(buffered, e->buffered_inotify_data_list, d); return 1; } @@ -3426,7 +3426,7 @@ static void event_inotify_data_drop(sd_event *e, struct inotify_data *d, size_t d->buffer_filled -= sz; if (d->buffer_filled == 0) - LIST_REMOVE(buffered, e->inotify_data_buffered, d); + LIST_REMOVE(buffered, e->buffered_inotify_data_list, d); } static int event_inotify_data_process(sd_event *e, struct inotify_data *d) { @@ -3519,7 +3519,7 @@ static int process_inotify(sd_event *e) { assert(e); - LIST_FOREACH(buffered, d, e->inotify_data_buffered) { + LIST_FOREACH(buffered, d, e->buffered_inotify_data_list) { r = event_inotify_data_process(e, d); if (r < 0) return r; @@ -3874,7 +3874,7 @@ _public_ int sd_event_prepare(sd_event *e) { event_close_inode_data_fds(e); - if (event_next_pending(e) || e->need_process_child || e->inotify_data_buffered) + if (event_next_pending(e) || e->need_process_child || e->buffered_inotify_data_list) goto pending; e->state = SD_EVENT_ARMED; @@ -3954,7 +3954,7 @@ static int process_epoll(sd_event *e, usec_t timeout, int64_t threshold, int64_t n_event_max = MALLOC_ELEMENTSOF(e->event_queue); /* If we still have inotify data buffered, then query the other fds, but don't wait on it */ - if (e->inotify_data_buffered) + if (e->buffered_inotify_data_list) timeout = 0; for (;;) {