aboutsummaryrefslogtreecommitdiffstats
path: root/host/lib/device.cpp
diff options
context:
space:
mode:
authorAshish Chaudhari <ashish@ettus.com>2014-10-10 17:24:40 -0700
committerAshish Chaudhari <ashish@ettus.com>2014-10-10 17:24:40 -0700
commitcca10287170e8ad50740791e7cbe715b642c2a87 (patch)
treec2ba1fe383b94a1f49d9a79f5301582567330dcf /host/lib/device.cpp
parentf30c5fee2a8d05f424ae1d733d0d99006eff930c (diff)
downloaduhd-cca10287170e8ad50740791e7cbe715b642c2a87.tar.gz
uhd-cca10287170e8ad50740791e7cbe715b642c2a87.tar.bz2
uhd-cca10287170e8ad50740791e7cbe715b642c2a87.zip
x300,nirio: Added support for NI-RIO 14.0
- Split niriok_proxy interfaces to support NI-RIO <=13.0 and >=14.0 kernel interfaces - Fixed multi-session race conditions by synchronizing niriok_proxy access - Fixed bug switching from NI LV-FPGA access to UHD access by changing how devices are hashed into a reservation table - Fixed calculation of FRAC values for CBX and SBX LO tuning by rounding instead of truncating - Fixed bug that was not setting two MSBs for band select configuration of CBX LO - Submitting on behalf of Patrick Sisterhen, Matthew Crymble
Diffstat (limited to 'host/lib/device.cpp')
-rw-r--r--host/lib/device.cpp13
1 files changed, 10 insertions, 3 deletions
diff --git a/host/lib/device.cpp b/host/lib/device.cpp
index 453781510..006ea6ec8 100644
--- a/host/lib/device.cpp
+++ b/host/lib/device.cpp
@@ -47,9 +47,16 @@ static size_t hash_device_addr(
){
//combine the hashes of sorted keys/value pairs
size_t hash = 0;
- BOOST_FOREACH(const std::string &key, uhd::sorted(dev_addr.keys())){
- boost::hash_combine(hash, key);
- boost::hash_combine(hash, dev_addr[key]);
+
+ if(dev_addr.has_key("resource")) {
+ boost::hash_combine(hash, "resource");
+ boost::hash_combine(hash, dev_addr["resource"]);
+ }
+ else {
+ BOOST_FOREACH(const std::string &key, uhd::sorted(dev_addr.keys())){
+ boost::hash_combine(hash, key);
+ boost::hash_combine(hash, dev_addr[key]);
+ }
}
return hash;
}