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/usrp2/mboard_impl.cpp | 16 ++++------------ 1 file changed, 4 insertions(+), 12 deletions(-) (limited to 'host/lib/usrp/usrp2/mboard_impl.cpp') diff --git a/host/lib/usrp/usrp2/mboard_impl.cpp b/host/lib/usrp/usrp2/mboard_impl.cpp index bf1fd5cce..4a28ea9c4 100644 --- a/host/lib/usrp/usrp2/mboard_impl.cpp +++ b/host/lib/usrp/usrp2/mboard_impl.cpp @@ -176,18 +176,10 @@ usrp2_mboard_impl::usrp2_mboard_impl( //------------------------------------------------------------------ } -usrp2_mboard_impl::~usrp2_mboard_impl(void){ - //Safely destruct all RAII objects in an mboard. - //This prevents the mboard deconstructor from throwing, - //which allows the device to be safely deconstructed. - UHD_SAFE_CALL(_iface->poke32(U2_REG_TX_CTRL_CYCLES_PER_UP, 0);) - UHD_SAFE_CALL(_iface->poke32(U2_REG_TX_CTRL_PACKETS_PER_UP, 0);) - UHD_SAFE_CALL(_dboard_manager.reset();) - UHD_SAFE_CALL(_dboard_iface.reset();) - UHD_SAFE_CALL(_codec_ctrl.reset();) - UHD_SAFE_CALL(_clock_ctrl.reset();) - UHD_SAFE_CALL(_gps_ctrl.reset();) -} +usrp2_mboard_impl::~usrp2_mboard_impl(void){UHD_SAFE_CALL( + _iface->poke32(U2_REG_TX_CTRL_CYCLES_PER_UP, 0); + _iface->poke32(U2_REG_TX_CTRL_PACKETS_PER_UP, 0); +)} /*********************************************************************** * Helper Methods -- cgit v1.2.3