Fix: merge issue with thread quit pipe
authorDavid Goulet <dgoulet@efficios.com>
Wed, 5 Feb 2014 17:18:04 +0000 (12:18 -0500)
committerDavid Goulet <dgoulet@efficios.com>
Mon, 10 Feb 2014 19:55:18 +0000 (14:55 -0500)
Signed-off-by: David Goulet <dgoulet@efficios.com>
src/bin/lttng-relayd/live.c
src/bin/lttng-relayd/lttng-relayd.h

index 887066f14c0822bd6c37c676a2fd7b82a79acf09..445f432e416a60f584516770c96bf3d278685d2b 100644 (file)
@@ -350,7 +350,7 @@ void stop_threads(void)
 
        /* Stopping all threads */
        DBG("Terminating all live threads");
-       ret = notify_thread_pipe(live_conn_pipe[1]);
+       ret = notify_thread_pipe(thread_quit_pipe[1]);
        if (ret < 0) {
                ERR("write error on thread quit pipe");
        }
@@ -379,7 +379,7 @@ int create_thread_poll_set(struct lttng_poll_event *events, int size)
        }
 
        /* Add quit pipe */
-       ret = lttng_poll_add(events, live_conn_pipe[0], LPOLLIN | LPOLLERR);
+       ret = lttng_poll_add(events, thread_quit_pipe[0], LPOLLIN | LPOLLERR);
        if (ret < 0) {
                goto error;
        }
@@ -396,9 +396,9 @@ error:
  * Return 1 if it was triggered else 0;
  */
 static
-int check_live_conn_pipe(int fd, uint32_t events)
+int check_thread_quit_pipe(int fd, uint32_t events)
 {
-       if (fd == live_conn_pipe[0] && (events & LPOLLIN)) {
+       if (fd == thread_quit_pipe[0] && (events & LPOLLIN)) {
                return 1;
        }
 
@@ -515,7 +515,7 @@ restart:
                        pollfd = LTTNG_POLL_GETFD(&events, i);
 
                        /* Thread quit pipe has been closed. Killing thread. */
-                       ret = check_live_conn_pipe(pollfd, revents);
+                       ret = check_thread_quit_pipe(pollfd, revents);
                        if (ret) {
                                err = 0;
                                goto exit;
@@ -1854,7 +1854,7 @@ restart:
                        health_code_update();
 
                        /* Thread quit pipe has been closed. Killing thread. */
-                       ret = check_live_conn_pipe(pollfd, revents);
+                       ret = check_thread_quit_pipe(pollfd, revents);
                        if (ret) {
                                err = 0;
                                goto exit;
index fa9d2ca74ce56957b4d7d1c151f9798edfeb8e75..55ce25ea6ff162871f2deb711e04ab26b587f07b 100644 (file)
@@ -54,6 +54,8 @@ extern const char *tracing_group_name;
 
 extern const char * const config_section_name;
 
+extern int thread_quit_pipe[2];
+
 void lttng_relay_notify_ready(void);
 
 #endif /* LTTNG_RELAYD_H */
This page took 0.027032 seconds and 4 git commands to generate.