From 09cf8eb16444b0c744b47b39b077f9d0fbb09886 Mon Sep 17 00:00:00 2001 From: Josh Blum Date: Fri, 10 Jun 2011 15:23:24 -0700 Subject: uhd: added more SAFE_CALL macros to hardware wrapper dtors And removed the calls on the sptr resets (not needed now). --- host/lib/usrp/usrp1/usrp1_impl.cpp | 18 ++++-------------- 1 file changed, 4 insertions(+), 14 deletions(-) (limited to 'host/lib/usrp/usrp1/usrp1_impl.cpp') diff --git a/host/lib/usrp/usrp1/usrp1_impl.cpp b/host/lib/usrp/usrp1/usrp1_impl.cpp index b1fa986d1..83ff8ebe2 100644 --- a/host/lib/usrp/usrp1/usrp1_impl.cpp +++ b/host/lib/usrp/usrp1/usrp1_impl.cpp @@ -208,20 +208,10 @@ usrp1_impl::usrp1_impl(uhd::transport::usb_zero_copy::sptr data_transport, this->mboard_set(MBOARD_PROP_TX_SUBDEV_SPEC, subdev_spec_t()); } -usrp1_impl::~usrp1_impl(void){ - UHD_SAFE_CALL(this->enable_rx(false);) - UHD_SAFE_CALL(this->enable_tx(false);) - //Safely destruct all RAII objects in a device. - //This prevents the mboard deconstructor from throwing, - //which allows the device to be safely deconstructed. - BOOST_FOREACH(dboard_slot_t slot, _dboard_slots){ - UHD_SAFE_CALL(_dboard_managers[slot].reset();) - UHD_SAFE_CALL(_dboard_ifaces[slot].reset();) - UHD_SAFE_CALL(_codec_ctrls[slot].reset();) - } - UHD_SAFE_CALL(_clock_ctrl.reset();) - UHD_SAFE_CALL(_io_impl.reset();) -} +usrp1_impl::~usrp1_impl(void){UHD_SAFE_CALL( + this->enable_rx(false); + this->enable_tx(false); +)} bool usrp1_impl::recv_async_msg(uhd::async_metadata_t &, double timeout){ //dummy fill-in for the recv_async_msg -- cgit v1.2.3