aboutsummaryrefslogtreecommitdiffstats
path: root/host/lib/usrp
diff options
context:
space:
mode:
authorJosh Blum <josh@joshknows.com>2011-11-11 12:28:08 -0800
committerJosh Blum <josh@joshknows.com>2011-11-11 12:28:08 -0800
commit3e4f64188bec333d8884a3849ec2377165b0017c (patch)
tree516ad994c85c28bf7ad5204feb44ffe73eaabc41 /host/lib/usrp
parent4b9d692f56dbc96b7e2defb889ed092388eeb332 (diff)
downloaduhd-3e4f64188bec333d8884a3849ec2377165b0017c.tar.gz
uhd-3e4f64188bec333d8884a3849ec2377165b0017c.tar.bz2
uhd-3e4f64188bec333d8884a3849ec2377165b0017c.zip
uhd: lots of tweaks for calibration utility
Diffstat (limited to 'host/lib/usrp')
-rw-r--r--host/lib/usrp/common/apply_corrections.cpp4
1 files changed, 3 insertions, 1 deletions
diff --git a/host/lib/usrp/common/apply_corrections.cpp b/host/lib/usrp/common/apply_corrections.cpp
index 95036e386..6929696bb 100644
--- a/host/lib/usrp/common/apply_corrections.cpp
+++ b/host/lib/usrp/common/apply_corrections.cpp
@@ -23,6 +23,7 @@
#include <uhd/types/dict.hpp>
#include <boost/filesystem.hpp>
#include <boost/foreach.hpp>
+#include <boost/thread/mutex.hpp>
#include <cstdio>
#include <complex>
#include <fstream>
@@ -39,7 +40,7 @@ static bool tx_fe_cal_comp(tx_fe_cal_t a, tx_fe_cal_t b){
return (a.tx_lo_freq < b.tx_lo_freq);
}
-//TODO should lock access to this
+boost::mutex corrections_mutex;;
static uhd::dict<std::string, std::vector<tx_fe_cal_t> > cache;
static double linear_interp(double x, double x0, double y0, double x1, double y1){
@@ -127,6 +128,7 @@ void uhd::usrp::apply_tx_fe_corrections(
const std::string &slot, //name of dboard slot
const double tx_lo_freq //actual lo freq
){
+ boost::mutex::scoped_lock l(corrections_mutex);
try{
_apply_tx_fe_corrections(sub_tree, slot, tx_lo_freq);
}