summaryrefslogtreecommitdiffstats
path: root/host/lib/device.cpp
diff options
context:
space:
mode:
authorJosh Blum <josh@joshknows.com>2010-03-27 01:02:58 -0700
committerJosh Blum <josh@joshknows.com>2010-03-27 01:02:58 -0700
commit52df9afd679fd0f42edeef29f0bbc0d7bd76559e (patch)
treebcb28585a0195560e0551012ec2cfb33833ef917 /host/lib/device.cpp
parentdd41206f2a5127871fc4c9911a748f7f4e3b6c51 (diff)
downloaduhd-52df9afd679fd0f42edeef29f0bbc0d7bd76559e.tar.gz
uhd-52df9afd679fd0f42edeef29f0bbc0d7bd76559e.tar.bz2
uhd-52df9afd679fd0f42edeef29f0bbc0d7bd76559e.zip
Split utils.hpp into subdir with multiple files.
static for static block and static instance (singleton) assert for assertion and throwing related stuff algorithm for my addons to std::algorithm (has) and a new one, safe main, for having a main catch-all
Diffstat (limited to 'host/lib/device.cpp')
-rw-r--r--host/lib/device.cpp7
1 files changed, 4 insertions, 3 deletions
diff --git a/host/lib/device.cpp b/host/lib/device.cpp
index cd8a01ab4..0bdbf5f23 100644
--- a/host/lib/device.cpp
+++ b/host/lib/device.cpp
@@ -17,7 +17,8 @@
#include <uhd/device.hpp>
#include <uhd/dict.hpp>
-#include <uhd/utils.hpp>
+#include <uhd/utils/assert.hpp>
+#include <uhd/utils/static.hpp>
#include <boost/foreach.hpp>
#include <boost/format.hpp>
#include <boost/weak_ptr.hpp>
@@ -59,7 +60,7 @@ static size_t hash_device_addr(
typedef boost::tuple<device::discover_t, device::make_t> dev_fcn_reg_t;
// instantiate the device function registry container
-STATIC_INSTANCE(std::vector<dev_fcn_reg_t>, get_dev_fcn_regs)
+UHD_SINGLETON_FCN(std::vector<dev_fcn_reg_t>, get_dev_fcn_regs)
void device::register_device(
const discover_t &discover,
@@ -136,7 +137,7 @@ device::sptr device::make(const device_addr_t &hint, size_t which){
return hash_to_device[dev_hash].lock();
}
//create and register a new device
- catch(const std::assert_error &){
+ catch(const uhd::assert_error &){
device::sptr dev = maker(dev_addr);
hash_to_device[dev_hash] = dev;
return dev;