+/*
+ * Initialize an already allocated poll event data structure. For epoll(), the
+ * epfd is set to -1 to indicate that it's not usable.
+ */
+static inline void lttng_poll_init(struct lttng_poll_event *events)
+{
+ memset(events, 0, sizeof(struct lttng_poll_event));
+ /* Set fd to -1 so if clean before created, we don't close 0. */
+ events->epfd = -1;
+}
+