aboutsummaryrefslogtreecommitdiffstats
path: root/host/lib
diff options
context:
space:
mode:
Diffstat (limited to 'host/lib')
-rw-r--r--host/lib/device.cpp7
-rw-r--r--host/lib/gain_handler.cpp2
-rw-r--r--host/lib/load_modules.cpp4
-rw-r--r--host/lib/simple_device.cpp4
-rw-r--r--host/lib/usrp/dboard/basic.cpp5
-rw-r--r--host/lib/usrp/dboard_manager.cpp5
-rw-r--r--host/lib/usrp/usrp2/dboard_impl.cpp2
-rw-r--r--host/lib/usrp/usrp2/dboard_interface.cpp2
-rw-r--r--host/lib/usrp/usrp2/dsp_impl.cpp2
-rw-r--r--host/lib/usrp/usrp2/mboard_impl.cpp2
-rw-r--r--host/lib/usrp/usrp2/usrp2_impl.cpp5
11 files changed, 22 insertions, 18 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;
diff --git a/host/lib/gain_handler.cpp b/host/lib/gain_handler.cpp
index 7dd1547cb..7b3dd266c 100644
--- a/host/lib/gain_handler.cpp
+++ b/host/lib/gain_handler.cpp
@@ -16,7 +16,7 @@
//
#include <uhd/gain_handler.hpp>
-#include <uhd/utils.hpp>
+#include <uhd/utils/assert.hpp>
#include <uhd/types.hpp>
#include <uhd/props.hpp>
#include <boost/assign/list_of.hpp>
diff --git a/host/lib/load_modules.cpp b/host/lib/load_modules.cpp
index 77426b898..babff1ca5 100644
--- a/host/lib/load_modules.cpp
+++ b/host/lib/load_modules.cpp
@@ -15,7 +15,7 @@
// along with this program. If not, see <http://www.gnu.org/licenses/>.
//
-#include <uhd/utils.hpp>
+#include <uhd/utils/static.hpp>
#include <boost/format.hpp>
#include <boost/foreach.hpp>
#include <boost/algorithm/string.hpp>
@@ -101,7 +101,7 @@ static void load_path(const fs::path &path){
* Load all the modules given by the module path enviroment variable.
* The path variable may be several paths split by path separators.
*/
-STATIC_BLOCK(load_modules){
+UHD_STATIC_BLOCK(load_modules){
//get the environment variable module path
char *env_module_path = std::getenv("UHD_MODULE_PATH");
if (env_module_path == NULL) return;
diff --git a/host/lib/simple_device.cpp b/host/lib/simple_device.cpp
index a25cb12e0..0eb69d9fa 100644
--- a/host/lib/simple_device.cpp
+++ b/host/lib/simple_device.cpp
@@ -16,8 +16,8 @@
//
#include <uhd/simple_device.hpp>
-#include <uhd/device.hpp>
-#include <uhd/utils.hpp>
+#include <uhd/utils/assert.hpp>
+#include <uhd/utils/algorithm.hpp>
#include <uhd/props.hpp>
#include <uhd/types.hpp>
#include <boost/algorithm/string.hpp>
diff --git a/host/lib/usrp/dboard/basic.cpp b/host/lib/usrp/dboard/basic.cpp
index 849cbd764..07cb8d11c 100644
--- a/host/lib/usrp/dboard/basic.cpp
+++ b/host/lib/usrp/dboard/basic.cpp
@@ -15,9 +15,10 @@
// along with this program. If not, see <http://www.gnu.org/licenses/>.
//
-#include <uhd/utils.hpp>
#include <uhd/props.hpp>
#include <uhd/types.hpp>
+#include <uhd/utils/assert.hpp>
+#include <uhd/utils/static.hpp>
#include <uhd/usrp/dboard_base.hpp>
#include <uhd/usrp/dboard_manager.hpp>
#include <boost/assign/list_of.hpp>
@@ -74,7 +75,7 @@ static dboard_base::sptr make_lf_tx(dboard_base::ctor_args_t const& args){
return dboard_base::sptr(new basic_tx(args, 32e6));
}
-STATIC_BLOCK(reg_dboards){
+UHD_STATIC_BLOCK(reg_dboards){
dboard_manager::register_dboard(0x0000, &make_basic_tx, "Basic TX");
dboard_manager::register_dboard(0x0001, &make_basic_rx, "Basic RX", list_of("ab")("a")("b"));
dboard_manager::register_dboard(0x000e, &make_lf_tx, "LF TX");
diff --git a/host/lib/usrp/dboard_manager.cpp b/host/lib/usrp/dboard_manager.cpp
index 6683534f1..0f2189cd1 100644
--- a/host/lib/usrp/dboard_manager.cpp
+++ b/host/lib/usrp/dboard_manager.cpp
@@ -17,7 +17,8 @@
#include <uhd/usrp/dboard_manager.hpp>
#include <uhd/gain_handler.hpp>
-#include <uhd/utils.hpp>
+#include <uhd/utils/static.hpp>
+#include <uhd/utils/assert.hpp>
#include <uhd/dict.hpp>
#include <boost/tuple/tuple.hpp>
#include <boost/format.hpp>
@@ -35,7 +36,7 @@ typedef boost::tuple<dboard_manager::dboard_ctor_t, std::string, prop_names_t> a
//map a dboard id to a dboard constructor
typedef uhd::dict<dboard_id_t, args_t> id_to_args_map_t;
-STATIC_INSTANCE(id_to_args_map_t, get_id_to_args_map)
+UHD_SINGLETON_FCN(id_to_args_map_t, get_id_to_args_map)
void dboard_manager::register_dboard(
dboard_id_t dboard_id,
diff --git a/host/lib/usrp/usrp2/dboard_impl.cpp b/host/lib/usrp/usrp2/dboard_impl.cpp
index 66e02d469..6b49ff29d 100644
--- a/host/lib/usrp/usrp2/dboard_impl.cpp
+++ b/host/lib/usrp/usrp2/dboard_impl.cpp
@@ -15,7 +15,7 @@
// along with this program. If not, see <http://www.gnu.org/licenses/>.
//
-#include <uhd/utils.hpp>
+#include <uhd/utils/assert.hpp>
#include <boost/format.hpp>
#include "usrp2_impl.hpp"
diff --git a/host/lib/usrp/usrp2/dboard_interface.cpp b/host/lib/usrp/usrp2/dboard_interface.cpp
index d20465147..8fc7864b0 100644
--- a/host/lib/usrp/usrp2/dboard_interface.cpp
+++ b/host/lib/usrp/usrp2/dboard_interface.cpp
@@ -15,7 +15,7 @@
// along with this program. If not, see <http://www.gnu.org/licenses/>.
//
-#include <uhd/utils.hpp>
+#include <uhd/utils/assert.hpp>
#include "usrp2_impl.hpp"
using namespace uhd::usrp;
diff --git a/host/lib/usrp/usrp2/dsp_impl.cpp b/host/lib/usrp/usrp2/dsp_impl.cpp
index 44f654863..654096d14 100644
--- a/host/lib/usrp/usrp2/dsp_impl.cpp
+++ b/host/lib/usrp/usrp2/dsp_impl.cpp
@@ -15,7 +15,7 @@
// along with this program. If not, see <http://www.gnu.org/licenses/>.
//
-#include <uhd/utils.hpp>
+#include <uhd/utils/assert.hpp>
#include <boost/format.hpp>
#include <boost/assign/list_of.hpp>
#include <boost/math/special_functions/round.hpp>
diff --git a/host/lib/usrp/usrp2/mboard_impl.cpp b/host/lib/usrp/usrp2/mboard_impl.cpp
index c56782c4b..e4706dcf0 100644
--- a/host/lib/usrp/usrp2/mboard_impl.cpp
+++ b/host/lib/usrp/usrp2/mboard_impl.cpp
@@ -15,7 +15,7 @@
// along with this program. If not, see <http://www.gnu.org/licenses/>.
//
-#include <uhd/utils.hpp>
+#include <uhd/utils/assert.hpp>
#include "usrp2_impl.hpp"
using namespace uhd;
diff --git a/host/lib/usrp/usrp2/usrp2_impl.cpp b/host/lib/usrp/usrp2/usrp2_impl.cpp
index 35a4aeb20..9dce351be 100644
--- a/host/lib/usrp/usrp2/usrp2_impl.cpp
+++ b/host/lib/usrp/usrp2/usrp2_impl.cpp
@@ -16,7 +16,8 @@
//
#include <uhd/transport/if_addrs.hpp>
-#include <uhd/utils.hpp>
+#include <uhd/utils/assert.hpp>
+#include <uhd/utils/static.hpp>
#include <boost/format.hpp>
#include <boost/foreach.hpp>
#include <boost/bind.hpp>
@@ -28,7 +29,7 @@ using namespace uhd::usrp;
using namespace uhd::transport;
namespace asio = boost::asio;
-STATIC_BLOCK(register_usrp2_device){
+UHD_STATIC_BLOCK(register_usrp2_device){
device::register_device(&usrp2::discover, &usrp2::make);
}