summaryrefslogtreecommitdiffstats
path: root/host
diff options
context:
space:
mode:
authorJosh Blum <josh@joshknows.com>2010-11-22 12:22:43 -0800
committerJosh Blum <josh@joshknows.com>2010-11-22 12:22:43 -0800
commit0c147c98dcfae13e802db9bbfb0fb6226ae9f115 (patch)
treea592df6dc9d6749072e2fdfcf0c9a0e547b1dfd5 /host
parentdd03a2a0dff2d34e7ffca95531eaa42c85fd756c (diff)
parente7b98030eb3ea7e42bd8d6fa5f115b0219ae2685 (diff)
downloaduhd-0c147c98dcfae13e802db9bbfb0fb6226ae9f115.tar.gz
uhd-0c147c98dcfae13e802db9bbfb0fb6226ae9f115.tar.bz2
uhd-0c147c98dcfae13e802db9bbfb0fb6226ae9f115.zip
Merge branch 'master' of ettus.sourcerepo.com:ettus/uhdpriv
Diffstat (limited to 'host')
-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 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();
}
}