Backport: relayd: track the live viewer worker thread's epoll fd
authorJérémie Galarneau <jeremie.galarneau@efficios.com>
Thu, 28 Jun 2018 02:38:52 +0000 (22:38 -0400)
committerJérémie Galarneau <jeremie.galarneau@efficios.com>
Fri, 6 Jul 2018 22:50:37 +0000 (18:50 -0400)
Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
src/bin/lttng-relayd/live.c

index e7663bfc1068a3c87015492673eafc4e5dc3423f..949eaf455a5eda0d3aa68ddbee24784328e04b7f 100644 (file)
@@ -418,15 +418,6 @@ error:
        return ret;
 }
 
-/*
- * Create a poll set with O_CLOEXEC and add the thread quit pipe to the set.
- */
-static
-int create_thread_poll_set(struct lttng_poll_event *events, int size)
-{
-       return create_named_thread_poll_set(events, size, "Unknown epoll");
-}
-
 /*
  * Check if the thread quit pipe was triggered.
  *
@@ -1956,7 +1947,8 @@ void *thread_worker(void *data)
                goto viewer_connections_ht_error;
        }
 
-       ret = create_thread_poll_set(&events, 2);
+       ret = create_named_thread_poll_set(&events, 2,
+                       "Live viewer worker thread epoll");
        if (ret < 0) {
                goto error_poll_create;
        }
@@ -2079,7 +2071,7 @@ restart:
 
 exit:
 error:
-       lttng_poll_clean(&events);
+       (void) fd_tracker_util_poll_clean(the_fd_tracker, &events);
 
        /* Cleanup reamaining connection object. */
        rcu_read_lock();
This page took 0.027001 seconds and 5 git commands to generate.