relayd: track the live viewer worker thread's epoll fd
authorJérémie Galarneau <jeremie.galarneau@efficios.com>
Wed, 27 Nov 2019 05:30:24 +0000 (00:30 -0500)
committerJérémie Galarneau <jeremie.galarneau@efficios.com>
Thu, 30 Jan 2020 06:55:34 +0000 (01:55 -0500)
Create the live worker threads' epoll fd through the
fd_tracker_util_poll_create() util. This causes the resulting fd
(in epoll mode) to be tracked by the fd tracker.

Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
Change-Id: I60b386b90e274283c566d94cfd4abcf57e0c1985

src/bin/lttng-relayd/live.c

index 419a8ebe4816004abc7705e24d1e28a68ee77109..d318159ca4dc528825d95b1ec7171241cf44d5c0 100644 (file)
@@ -461,15 +461,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.
  *
@@ -2187,7 +2178,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;
        }
@@ -2310,7 +2302,7 @@ restart:
 
 exit:
 error:
-       lttng_poll_clean(&events);
+       (void) fd_tracker_util_poll_clean(the_fd_tracker, &events);
 
        /* Cleanup remaining connection object. */
        rcu_read_lock();
This page took 0.034561 seconds and 4 git commands to generate.