X-Git-Url: https://git.lttng.org/?a=blobdiff_plain;f=src%2Fcommon%2Fcompat%2Fpoll.h;h=d7020f366dd7c9300f4a4a5810cb48292cb167b1;hb=b14f53d4c3a465449216c525a985c9c3622ce109;hp=fde54ddb91331c46a28ce75c590b060d338ef845;hpb=2a85be8e0e679da996b48252b1d9aebb9bb29126;p=lttng-tools.git diff --git a/src/common/compat/poll.h b/src/common/compat/poll.h index fde54ddb9..d7020f366 100644 --- a/src/common/compat/poll.h +++ b/src/common/compat/poll.h @@ -315,10 +315,12 @@ static inline int __lttng_poll_get_prev_fd(struct lttng_poll_event *events, /* * For the following calls, consider 'e' to be a lttng_poll_event pointer and i * being the index of the events array. + * LTTNG_POLL_GETNB is always used after lttng_poll_wait, thus we can use the + * current list for test compatibility purposes. */ #define LTTNG_POLL_GETFD(e, i) LTTNG_REF(e)->wait.events[i].fd #define LTTNG_POLL_GETEV(e, i) LTTNG_REF(e)->wait.events[i].revents -#define LTTNG_POLL_GETNB(e) LTTNG_REF(e)->wait.nb_fd +#define LTTNG_POLL_GETNB(e) LTTNG_REF(e)->current.nb_fd #define LTTNG_POLL_GETSZ(e) LTTNG_REF(e)->wait.events_size #define LTTNG_POLL_GET_PREV_FD(e, i, nb_fd) \ __lttng_poll_get_prev_fd(LTTNG_REF(e), i, nb_fd) @@ -356,7 +358,7 @@ extern int compat_poll_del(struct lttng_poll_event *events, int fd); compat_poll_del(events, fd) /* - * Modify an fd's events in the epoll set. + * Modify an fd's events in the poll set. */ extern int compat_poll_mod(struct lttng_poll_event *events, int fd, uint32_t req_events);