From 6b9ad0332babbd384be39020dff37ea50dfd05d6 Mon Sep 17 00:00:00 2001 From: Carles Fernandez Date: Fri, 22 Dec 2023 10:33:59 +0100 Subject: [PATCH] Fix data race condition --- .../tracking/gnuradio_blocks/gps_l1_ca_gaussian_tracking_cc.cc | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/algorithms/tracking/gnuradio_blocks/gps_l1_ca_gaussian_tracking_cc.cc b/src/algorithms/tracking/gnuradio_blocks/gps_l1_ca_gaussian_tracking_cc.cc index 710c244e7..d51557441 100644 --- a/src/algorithms/tracking/gnuradio_blocks/gps_l1_ca_gaussian_tracking_cc.cc +++ b/src/algorithms/tracking/gnuradio_blocks/gps_l1_ca_gaussian_tracking_cc.cc @@ -609,7 +609,7 @@ int Gps_L1_Ca_Gaussian_Tracking_cc::general_work(int noutput_items __attribute__ // GNSS_SYNCHRO OBJECT to interchange data between tracking->telemetry_decoder Gnss_Synchro current_synchro_data = Gnss_Synchro(); - + gr::thread::scoped_lock l(d_setlock); if (d_enable_tracking == true) { // Fill the acquisition data @@ -746,7 +746,6 @@ int Gps_L1_Ca_Gaussian_Tracking_cc::general_work(int noutput_items __attribute__ d_rem_code_phase_chips = d_code_freq_chips * (d_rem_code_phase_samples / static_cast(d_fs_in)); // ####### CN0 ESTIMATION AND LOCK DETECTORS ###### - gr::thread::scoped_lock l(d_setlock); if (d_cn0_estimation_counter < FLAGS_cn0_samples) { // fill buffer with prompt correlator output values