metrics_stdout: fix race detected by TSAN

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

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

@ -50,7 +50,7 @@ private:
std::string float_to_eng_string(float f, int digits);
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
uint8_t n_reports = 10;
ue_metrics_interface* ue = nullptr;

Loading…
Cancel
Save