aboutsummaryrefslogtreecommitdiffstats
path: root/lib/device.cc
diff options
context:
space:
mode:
authorClayton Smith <argilo at gmail.com>2020-08-02 23:52:10 +0200
committerEric Wild <ewild@sysmocom.de>2020-08-02 23:52:25 +0200
commit52fcb0935f22f7abbbb582c9a757ac9b10ae95a4 (patch)
treeb13e77903321cb05861e10130d6cd11941e9c043 /lib/device.cc
parent49f9b2df2a2126ead28a958ebf04f2a0822adbe0 (diff)
A lot of Boost functionality is available in C++11. Since GNU Radio is moving away from Boost, it probably makes sense to do so in gr-osmosdr as well.
This change removes all usage of boost::mutex, boost::mutex::scoped_lock, boost::unique_lock, and boost::condition_variable. It also removes usage of boost::shared_ptr and boost::weak_ptr outside of block definitions (which must continue to use Boost until GNU Radio 3.9). Signed-off-by: Eric Wild <ewild@sysmocom.de>
Diffstat (limited to 'lib/device.cc')
-rw-r--r--lib/device.cc6
1 files changed, 3 insertions, 3 deletions
diff --git a/lib/device.cc b/lib/device.cc
index 586062f..015383d 100644
--- a/lib/device.cc
+++ b/lib/device.cc
@@ -22,8 +22,8 @@
#include <stdexcept>
#include <boost/foreach.hpp>
#include <boost/format.hpp>
-#include <boost/thread/mutex.hpp>
#include <algorithm>
+#include <mutex>
#include <sstream>
#ifdef HAVE_CONFIG_H
@@ -102,7 +102,7 @@ static const std::string args_delim = " ";
static const std::string pairs_delim = ",";
static const std::string pair_delim = "=";
-static boost::mutex _device_mutex;
+static std::mutex _device_mutex;
device_t::device_t(const std::string &args)
{
@@ -141,7 +141,7 @@ std::string device_t::to_string(void) const
devices_t device::find(const device_t &hint)
{
- boost::mutex::scoped_lock lock(_device_mutex);
+ std::lock_guard<std::mutex> lock(_device_mutex);
bool fake = true;