diff options
author | Josh Blum <josh@joshknows.com> | 2010-11-22 12:23:04 -0800 |
---|---|---|
committer | Josh Blum <josh@joshknows.com> | 2010-11-22 12:23:04 -0800 |
commit | e7b98030eb3ea7e42bd8d6fa5f115b0219ae2685 (patch) | |
tree | 6983eac6a1ffc8839144c91c05a7240d7c6656da /host/lib/usrp/usrp2/io_impl.cpp | |
parent | 89ae5f3f651cff22226e2b2c0ce0ed796dad4c71 (diff) | |
download | uhd-e7b98030eb3ea7e42bd8d6fa5f115b0219ae2685.tar.gz uhd-e7b98030eb3ea7e42bd8d6fa5f115b0219ae2685.tar.bz2 uhd-e7b98030eb3ea7e42bd8d6fa5f115b0219ae2685.zip |
usrp2: ms didnt seem to like unlocking an unlocked mutex
Diffstat (limited to 'host/lib/usrp/usrp2/io_impl.cpp')
-rw-r--r-- | host/lib/usrp/usrp2/io_impl.cpp | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/host/lib/usrp/usrp2/io_impl.cpp b/host/lib/usrp/usrp2/io_impl.cpp index 4d9528f66..4b498ff7f 100644 --- a/host/lib/usrp/usrp2/io_impl.cpp +++ b/host/lib/usrp/usrp2/io_impl.cpp @@ -165,8 +165,7 @@ void usrp2_impl::io_init(void){ //create a new pirate thread for each zc if (yarr!!) for (size_t i = 0; i < _data_transports.size(); i++){ - //ensure a non-blocking mutex lock - _io_impl->spawn_mutex.unlock(); + //lock the unlocked mutex (non-blocking) _io_impl->spawn_mutex.lock(); //spawn a new pirate to plunder the recv booty _io_impl->recv_pirate_crew.create_thread(boost::bind( @@ -174,8 +173,10 @@ void usrp2_impl::io_init(void){ _io_impl.get(), _data_transports.at(i), _mboards.at(i), i )); - //will block here until the thread unlocks + //block here until the spawned thread unlocks _io_impl->spawn_mutex.lock(); + //exit loop iteration in an unlocked condition + _io_impl->spawn_mutex.unlock(); } } |