X-Git-Url: https://git.liburcu.org/?a=blobdiff_plain;f=src%2Fbin%2Flttng-sessiond%2Ftimer.cpp;h=30eb13446e3badb44e1e278e5f8ad5c636490e7c;hb=042670db60ac672661e1bbc8de4da1d8590e20b4;hp=5a1f35dfa936904f236e7dac108cdf044789f067;hpb=7966af5763c4aaca39df9bbfa9277ff15715c720;p=lttng-tools.git diff --git a/src/bin/lttng-sessiond/timer.cpp b/src/bin/lttng-sessiond/timer.cpp index 5a1f35dfa..30eb13446 100644 --- a/src/bin/lttng-sessiond/timer.cpp +++ b/src/bin/lttng-sessiond/timer.cpp @@ -10,10 +10,10 @@ #include #include -#include "timer.h" -#include "health-sessiond.h" -#include "rotation-thread.h" -#include "thread.h" +#include "timer.hpp" +#include "health-sessiond.hpp" +#include "rotation-thread.hpp" +#include "thread.hpp" #define LTTNG_SESSIOND_SIG_QS SIGRTMIN + 10 #define LTTNG_SESSIOND_SIG_EXIT SIGRTMIN + 11 @@ -27,13 +27,13 @@ }) #define PTR_TO_UINT(ptr) ((uintptr_t) ptr) +namespace { /* * Handle timer teardown race wrt memory free of private data by sessiond * signals are handled by a single thread, which permits a synchronization * point between handling of each signal. Internal lock ensures mutual * exclusion. */ -static struct timer_signal_data { /* Thread managing signals. */ pthread_t tid; @@ -44,6 +44,7 @@ struct timer_signal_data { .qs_done = 0, .lock = PTHREAD_MUTEX_INITIALIZER, }; +} /* namespace */ /* * Set custom signal mask to current thread. @@ -406,7 +407,7 @@ end: } static -bool shutdown_timer_thread(void *data) +bool shutdown_timer_thread(void *data __attribute__((unused))) { return kill(getpid(), LTTNG_SESSIOND_SIG_EXIT) == 0; }