diff options
author | Nick Foster <nick@nerdnetworks.org> | 2010-10-08 16:58:45 -0700 |
---|---|---|
committer | Nick Foster <nick@nerdnetworks.org> | 2010-10-08 16:58:45 -0700 |
commit | 3df994e1c784d7037e869610f1417fe64e0e89a8 (patch) | |
tree | 03183a0bff1b128d70d90aee5f9e6c641b9cf999 /host/lib/transport/libusb1_base.cpp | |
parent | 4a6990c5d3019ca6881464f135a315e3ec022b93 (diff) | |
parent | 58e1ca09772408d5d18ee219146fe57d2045c496 (diff) | |
download | uhd-3df994e1c784d7037e869610f1417fe64e0e89a8.tar.gz uhd-3df994e1c784d7037e869610f1417fe64e0e89a8.tar.bz2 uhd-3df994e1c784d7037e869610f1417fe64e0e89a8.zip |
Merge branch 'master' of ettus.sourcerepo.com:ettus/uhdpriv into usrp2p
Conflicts:
host/lib/usrp/usrp2/io_impl.cpp
host/lib/usrp/usrp2/mboard_impl.cpp
Diffstat (limited to 'host/lib/transport/libusb1_base.cpp')
-rw-r--r-- | host/lib/transport/libusb1_base.cpp | 22 |
1 files changed, 0 insertions, 22 deletions
diff --git a/host/lib/transport/libusb1_base.cpp b/host/lib/transport/libusb1_base.cpp index 1dd0b48e8..cfa77d9ca 100644 --- a/host/lib/transport/libusb1_base.cpp +++ b/host/lib/transport/libusb1_base.cpp @@ -16,12 +16,10 @@ // #include "libusb1_base.hpp" -#include <uhd/utils/thread_priority.hpp> #include <uhd/utils/assert.hpp> #include <uhd/types/dict.hpp> #include <boost/weak_ptr.hpp> #include <boost/foreach.hpp> -#include <boost/thread.hpp> #include <iostream> using namespace uhd; @@ -35,14 +33,9 @@ public: libusb_session_impl(void){ UHD_ASSERT_THROW(libusb_init(&_context) == 0); libusb_set_debug(_context, debug_level); - _mutex.lock(); - _thread_group.create_thread(boost::bind(&libusb_session_impl::run_event_loop, this)); - _mutex.lock(); } ~libusb_session_impl(void){ - _running = false; - _thread_group.join_all(); libusb_exit(_context); } @@ -52,21 +45,6 @@ public: private: libusb_context *_context; - boost::thread_group _thread_group; - bool _running; - boost::mutex _mutex; - - void run_event_loop(void){ - set_thread_priority_safe(); - _running = true; - timeval tv; - _mutex.unlock(); - while(_running){ - tv.tv_sec = 0; - tv.tv_usec = 100000; //100ms - libusb_handle_events_timeout(this->get_context(), &tv); - } - } }; libusb::session::sptr libusb::session::get_global_session(void){ |