[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Discuss-gnuradio] Fix/Workaround teardown problem in cppdb feature
From: |
Eric Blossom |
Subject: |
Re: [Discuss-gnuradio] Fix/Workaround teardown problem in cppdb feature branch |
Date: |
Wed, 8 Oct 2008 09:13:34 -0700 |
User-agent: |
Mutt/1.5.18 (2008-05-17) |
On Wed, Oct 08, 2008 at 04:40:59PM +0200, Stefan Brüns wrote:
> Hi,
>
> I have noticed some problem in the cppdb branch (at least) in combination
> with
> the inband code.
>
> when the usrp instances are destructed, the vector holding the daughterboard
> instances is destructed as well, but there seems to be some problem doing the
> destruction in the right order. Symptoms are: a) deadlock in the inband
> examples, b) gdb stopping in siglongjmp, c) valgrind reporting accesses to
> already freed memory.
>
> The attached small patch fixes this problem.
> Stefan
Thanks. FYI, I reworking a lot of this in a dev branch right now.
Eric
>
> --
> Stefan Brüns / Bergstraße 21 / 52062 Aachen
> mailto:lurch at gmx.li http://www.kawo1.rwth-aachen.de/~lurchi/
> phone: +49 241 53809034 mobile: +49 151 50412019
> === modified file 'usrp/host/lib/legacy/usrp_basic.cc'
> --- usrp/host/lib/legacy/usrp_basic.cc 2008-09-24 17:59:43 +0000
> +++ usrp/host/lib/legacy/usrp_basic.cc 2008-10-08 14:15:58 +0000
> @@ -815,6 +815,8 @@
> if (!usrp_9862_write_many_all (d_udh, rx_fini_regs, sizeof
> (rx_fini_regs))){
> fprintf (stderr, "usrp_basic_rx: failed to fini AD9862 RX regs\n");
> }
> + d_db[SLOT_RX_A].resize(0);
> + d_db[SLOT_RX_B].resize(0);
> }
>
> int
> @@ -1208,6 +1210,8 @@
> if (!usrp_9862_write_many_all (d_udh, tx_fini_regs, sizeof
> (tx_fini_regs))){
> fprintf (stderr, "usrp_basic_tx: failed to fini AD9862 TX regs\n");
> }
> + d_db[SLOT_TX_A].resize(0);
> + d_db[SLOT_TX_B].resize(0);
> }
>
> int