X-Git-Url: https://git.lttng.org/?a=blobdiff_plain;f=src%2Fbin%2Flttng-sessiond%2Futils.cpp;h=f3446bc26c5b660a18e2611617f6c2fb4e7ce17b;hb=c9e313bc594f40a86eed237dce222c0fc99c957f;hp=5b33a8df8a313320b6b4338e7686330a5b41b65a;hpb=21cf9b6b1843774306a76f4dccddddd706b64f79;p=lttng-tools.git diff --git a/src/bin/lttng-sessiond/utils.cpp b/src/bin/lttng-sessiond/utils.cpp index 5b33a8df8..f3446bc26 100644 --- a/src/bin/lttng-sessiond/utils.cpp +++ b/src/bin/lttng-sessiond/utils.cpp @@ -10,13 +10,11 @@ #include #include -#include +#include -#include "utils.h" -#include "snapshot.h" -#include "lttng-sessiond.h" - -int the_ht_cleanup_pipe[2] = {-1, -1}; +#include "utils.hpp" +#include "snapshot.hpp" +#include "lttng-sessiond.hpp" /* * Write to writable pipe used to notify a thread. @@ -38,31 +36,6 @@ int notify_thread_pipe(int wpipe) return (int) ret; } -void ht_cleanup_push(struct lttng_ht *ht) -{ - ssize_t ret; - int fd = the_ht_cleanup_pipe[1]; - - if (!ht) { - return; - } - if (fd < 0) - return; - ret = lttng_write(fd, &ht, sizeof(ht)); - if (ret < sizeof(ht)) { - PERROR("write ht cleanup pipe %d", fd); - if (ret < 0) { - ret = -errno; - } - goto error; - } - - /* All good. Don't send back the write positive ret value. */ - ret = 0; -error: - LTTNG_ASSERT(!ret); -} - int loglevels_match(int a_loglevel_type, int a_loglevel_value, int b_loglevel_type, int b_loglevel_value, int loglevel_all_type) {