Fix: sessiond: ODR violation results in memory corruption
[lttng-tools.git] / src / bin / lttng-sessiond / timer.cpp
index 9635dea81a426c4774cf85640e12b2e0efa83c37..30eb13446e3badb44e1e278e5f8ad5c636490e7c 100644 (file)
 #include <inttypes.h>
 #include <signal.h>
 
-#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
        })
 #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.
This page took 0.023408 seconds and 4 git commands to generate.