[LTP] [PATCH 2/6] api/evloop: Add helpers for creating an event loop
Petr Vorel
pvorel@suse.cz
Fri Sep 30 15:36:07 CEST 2022
Hi Richie,
> +++ b/lib/tst_evloop.c
...
> +void tst_evloop_run(struct tst_evloop *self)
> +{
> + static int saturated_warn;
> + const int maxevents = 128;
> + struct epoll_event events[maxevents];
> +
> + for (;;) {
> + const int ev_num = SAFE_EPOLL_WAIT(self->epollfd, events,
> + maxevents, self->timeout);
> +
> + for (int i = 0; i < ev_num; i++)
I'm sorry we still do not allow to use C99 due CentOS 7 still supported:
lib/tst_evloop.c:80:3: error: 'for' loop initial declarations are only allowed in C99 mode
Kind regards,
Petr
More information about the ltp
mailing list