aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAshish Chaudhari <ashish@ettus.com>2014-10-15 12:23:32 -0700
committerMartin Braun <martin.braun@ettus.com>2014-10-16 21:07:53 +0200
commite906c610cc95c1df58ffd4b05f56153643f38b0b (patch)
tree81a0653f17302bdb2cff431b25a33ea746494ef0
parentbde8e9a34291c3d082e2dceab4ee7c7a89d90bb3 (diff)
downloaduhd-e906c610cc95c1df58ffd4b05f56153643f38b0b.tar.gz
uhd-e906c610cc95c1df58ffd4b05f56153643f38b0b.tar.bz2
uhd-e906c610cc95c1df58ffd4b05f56153643f38b0b.zip
nirio: Removed modern boost synchronization types to support older versions
- Replaced shared_lock_guard with shared_lock - Replaced lock_guard with upgrade_lock and upgrade_to_unique_lock
-rw-r--r--host/include/uhd/transport/nirio/niriok_proxy.h8
1 files changed, 4 insertions, 4 deletions
diff --git a/host/include/uhd/transport/nirio/niriok_proxy.h b/host/include/uhd/transport/nirio/niriok_proxy.h
index 5ea796dec..07bcb59b6 100644
--- a/host/include/uhd/transport/nirio/niriok_proxy.h
+++ b/host/include/uhd/transport/nirio/niriok_proxy.h
@@ -22,8 +22,7 @@
#include <boost/smart_ptr.hpp>
#include <boost/noncopyable.hpp>
#include <boost/thread/shared_mutex.hpp>
-#include <boost/thread/locks.hpp>
-#include <boost/thread/shared_lock_guard.hpp>
+#include <boost/thread/locks.hpp>
#include <uhd/transport/nirio/nirio_driver_iface.h>
#include <uhd/transport/nirio/nirio_quirks.h>
@@ -43,10 +42,11 @@
#define GET_FIFO_MEMORY_TYPE(fifo_inst) (static_cast<uint16_t>(0x0100 | static_cast<uint16_t>(fifo_inst)))
#define READER_LOCK \
- boost::shared_lock_guard<boost::shared_mutex> reader_lock(_synchronization);
+ boost::shared_lock<boost::shared_mutex> reader_lock(_synchronization);
#define WRITER_LOCK \
- boost::lock_guard<boost::shared_mutex> writer_lock(_synchronization);
+ boost::upgrade_lock<boost::shared_mutex> write_upgrade_lock(_synchronization);\
+ boost::upgrade_to_unique_lock<boost::shared_mutex> write_unique_lock(write_upgrade_lock);
namespace uhd { namespace niusrprio