From 1ef40895952f94ccd21fca48033b5a14d7e4ff30 Mon Sep 17 00:00:00 2001 From: Josh Blum Date: Sat, 2 Jul 2011 19:35:33 -0700 Subject: usrp1: tweaks + implemented other features to mimic async and inline messages Moved the underflow/overflow polling into a thread and out of the fast-path. Added an inline and async message queue into soft time control. Error and status messages are actually generated now and enqueued. Passes the async message test... --- host/lib/transport/libusb1_control.cpp | 3 +++ 1 file changed, 3 insertions(+) (limited to 'host/lib/transport') diff --git a/host/lib/transport/libusb1_control.cpp b/host/lib/transport/libusb1_control.cpp index f903907d0..bce3d4b0b 100644 --- a/host/lib/transport/libusb1_control.cpp +++ b/host/lib/transport/libusb1_control.cpp @@ -17,6 +17,7 @@ #include "libusb1_base.hpp" #include +#include using namespace uhd::transport; @@ -40,6 +41,7 @@ public: unsigned char *buff, boost::uint16_t length ){ + boost::mutex::scoped_lock lock(_mutex); return libusb_control_transfer(_handle->get(), request_type, request, @@ -52,6 +54,7 @@ public: private: libusb::device_handle::sptr _handle; + boost::mutex _mutex; }; /*********************************************************************** -- cgit v1.2.3