mirror of
https://github.com/gnss-sdr/gnss-sdr
synced 2024-12-13 03:30:33 +00:00
Fix potenctial data race condition
This commit is contained in:
parent
4afee8b7be
commit
a152226f50
@ -212,6 +212,13 @@ gr::basic_block_sptr Channel::get_right_block()
|
||||
}
|
||||
|
||||
|
||||
Gnss_Signal Channel::get_signal()
|
||||
{
|
||||
std::lock_guard<std::mutex> lk(mx_);
|
||||
return gnss_signal_;
|
||||
}
|
||||
|
||||
|
||||
void Channel::set_signal(const Gnss_Signal& gnss_signal)
|
||||
{
|
||||
std::lock_guard<std::mutex> lk(mx_);
|
||||
|
@ -84,7 +84,7 @@ public:
|
||||
inline std::string role() override { return role_; }
|
||||
inline std::string implementation() override { return std::string("Channel"); } //!< Returns "Channel"
|
||||
inline size_t item_size() override { return 2 * sizeof(float); }
|
||||
inline Gnss_Signal get_signal() const override { return gnss_signal_; }
|
||||
Gnss_Signal get_signal() override;
|
||||
void start_acquisition() override; //!< Start the State Machine
|
||||
void stop_channel() override; //!< Stop the State Machine
|
||||
void set_signal(const Gnss_Signal& gnss_signal_) override; //!< Sets the channel GNSS signal
|
||||
|
@ -49,7 +49,7 @@ public:
|
||||
virtual gr::basic_block_sptr get_right_block_acq() = 0;
|
||||
virtual gr::basic_block_sptr get_left_block() = 0;
|
||||
virtual gr::basic_block_sptr get_right_block() = 0;
|
||||
virtual Gnss_Signal get_signal() const = 0;
|
||||
virtual Gnss_Signal get_signal() = 0;
|
||||
virtual void start_acquisition() = 0;
|
||||
virtual void assist_acquisition_doppler(double Carrier_Doppler_hz) = 0;
|
||||
virtual void stop_channel() = 0;
|
||||
|
Loading…
Reference in New Issue
Block a user