-struct health_app {
- /* List of health state, for each application thread */
- struct cds_list_head list;
- /*
- * This lock ensures that TLS memory used for the node and its
- * container structure don't get reclaimed after the TLS owner
- * thread exits until we have finished using it.
- */
- pthread_mutex_t lock;
- int nr_types;
- struct timespec time_delta;
- /* Health flags containing thread type error state */
- enum health_flags *flags;
-};
+static void *thread_manage_health(void *thread_data)
+{
+ const bool is_root = (getuid() == 0);
+ int sock = -1, new_sock = -1, ret, i, pollfd, err = -1;
+ uint32_t revents, nb_fd;
+ struct lttng_poll_event events;
+ struct health_comm_msg msg;
+ struct health_comm_reply reply;
+ /* Thread-specific quit pipe. */
+ struct lttng_pipe *quit_pipe = thread_data;
+ const int quit_pipe_read_fd = lttng_pipe_get_readfd(quit_pipe);