metrics_stdout: fix race detected by TSAN

master
Andre Puschmann 4 years ago
parent 1ef3cb7e5d
commit 2c975732dc

@ -41,9 +41,9 @@ private:
std::string int_to_hex_string(int value, int field_width); std::string int_to_hex_string(int value, int field_width);
std::string float_to_eng_string(float f, int digits); std::string float_to_eng_string(float f, int digits);
bool do_print; std::atomic<bool> do_print = {false};
uint8_t n_reports; uint8_t n_reports = 0;
enb_metrics_interface* enb; enb_metrics_interface* enb = nullptr;
}; };
} // namespace srsenb } // namespace srsenb

@ -50,7 +50,7 @@ private:
std::string float_to_eng_string(float f, int digits); std::string float_to_eng_string(float f, int digits);
void print_table(const bool display_neighbours, const bool is_nr); void print_table(const bool display_neighbours, const bool is_nr);
bool do_print = false; std::atomic<bool> do_print = {false};
bool table_has_neighbours = false; ///< state of last table head bool table_has_neighbours = false; ///< state of last table head
uint8_t n_reports = 10; uint8_t n_reports = 10;
ue_metrics_interface* ue = nullptr; ue_metrics_interface* ue = nullptr;

Loading…
Cancel
Save