mirror of
https://github.com/gnss-sdr/gnss-sdr
synced 2024-12-14 12:10:34 +00:00
Revert change of std::thread, since it is not working well in some configurations
This commit is contained in:
parent
399c559865
commit
2b5b1d10ad
@ -659,10 +659,8 @@ void pcps_acquisition::acquisition_core(uint64_t samp_count)
|
||||
<< ", doppler_step: " << d_doppler_step
|
||||
<< ", use_CFAR_algorithm_flag: " << (d_use_CFAR_algorithm_flag ? "true" : "false");
|
||||
|
||||
if (d_acq_parameters.blocking)
|
||||
{
|
||||
lk.unlock();
|
||||
}
|
||||
lk.unlock();
|
||||
|
||||
// Doppler frequency grid loop
|
||||
if (!d_step_two)
|
||||
{
|
||||
@ -784,11 +782,7 @@ void pcps_acquisition::acquisition_core(uint64_t samp_count)
|
||||
}
|
||||
}
|
||||
|
||||
if (d_acq_parameters.blocking)
|
||||
{
|
||||
lk.lock();
|
||||
}
|
||||
|
||||
lk.lock();
|
||||
if (!d_acq_parameters.bit_transition_flag)
|
||||
{
|
||||
if (d_test_statistics > d_threshold)
|
||||
@ -878,6 +872,7 @@ void pcps_acquisition::acquisition_core(uint64_t samp_count)
|
||||
send_negative_acquisition();
|
||||
}
|
||||
}
|
||||
d_worker_active = false;
|
||||
|
||||
if ((d_num_noncoherent_integrations_counter == d_acq_parameters.max_dwells) or (d_positive_acq == 1))
|
||||
{
|
||||
@ -889,8 +884,6 @@ void pcps_acquisition::acquisition_core(uint64_t samp_count)
|
||||
d_num_noncoherent_integrations_counter = 0U;
|
||||
d_positive_acq = 0;
|
||||
}
|
||||
|
||||
d_worker_active = false;
|
||||
}
|
||||
|
||||
|
||||
@ -937,7 +930,6 @@ int pcps_acquisition::general_work(int noutput_items __attribute__((unused)),
|
||||
* 6. Declare positive or negative acquisition using a message port
|
||||
*/
|
||||
gr::thread::scoped_lock lk(d_setlock);
|
||||
|
||||
if (!d_active or d_worker_active)
|
||||
{
|
||||
if (!d_acq_parameters.blocking_on_standby)
|
||||
@ -1024,8 +1016,7 @@ int pcps_acquisition::general_work(int noutput_items __attribute__((unused)),
|
||||
}
|
||||
else
|
||||
{
|
||||
d_worker = std::thread([&] { pcps_acquisition::acquisition_core(d_sample_counter); });
|
||||
d_worker.detach();
|
||||
gr::thread::thread d_worker(&pcps_acquisition::acquisition_core, this, d_sample_counter);
|
||||
d_worker_active = true;
|
||||
}
|
||||
consume_each(0);
|
||||
|
@ -61,8 +61,8 @@
|
||||
#include <memory>
|
||||
#include <queue>
|
||||
#include <string>
|
||||
#include <thread>
|
||||
#include <utility>
|
||||
|
||||
#if HAS_STD_SPAN
|
||||
#include <span>
|
||||
namespace own = std;
|
||||
@ -259,7 +259,6 @@ private:
|
||||
arma::fmat d_narrow_grid;
|
||||
|
||||
std::string d_dump_filename;
|
||||
std::thread d_worker;
|
||||
|
||||
int64_t d_dump_number;
|
||||
uint64_t d_sample_counter;
|
||||
|
Loading…
Reference in New Issue
Block a user