summaryrefslogtreecommitdiffstats
path: root/host/lib
diff options
context:
space:
mode:
Diffstat (limited to 'host/lib')
-rw-r--r--host/lib/usrp/usrp2/io_impl.cpp7
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 7b10e383e..f2101519d 100644
--- a/host/lib/usrp/usrp2/io_impl.cpp
+++ b/host/lib/usrp/usrp2/io_impl.cpp
@@ -255,8 +255,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(
@@ -264,8 +263,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();
}
}