aboutsummaryrefslogtreecommitdiffstats
path: root/host/lib/transport/libusb1_control.cpp
Commit message (Collapse)AuthorAgeFilesLines
* uhd: Replace Boost mutexes and locks with standard optionsMartin Braun2021-10-191-3/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This is a very mechanical task that could almost have been done with sed. Boost versions of mutexes and locks were removed, and replaced with std:: versions. The replacement tables are as follows: == Mutexes == - boost::mutex -> std::mutex - boost::recursive_mutex -> std::recursive_mutex Mutexes behave identically between Boost and std:: and have the same API. == Locks == C++11 has only two types of lock that we use/need in UHD: - std::lock_guard: Identical to boost::lock_guard - std::unique_lock: Identical to boost::unique_lock Boost also has boost::mutex::scoped_lock, which is a typedef for boost::unique_lock<>. However, we often have used scoped_lock where we meant to use lock_guard<>. The name is a bit misleading, "scoped lock" sounding a bit like an RAII mechanism. Therefore, some previous boost::mutex::scoped_lock are now std::lock_guard<>. std::unique_lock is required when doing more than RAII locking (i.e., unlocking, relocking, usage with condition variables, etc.). == Condition Variables == Condition variables were out of the scope of this lock/mutex change, but in UHD, we inconsistently use boost::condition vs. boost::condition_variable. The former is a templated version of the latter, and thus works fine with std::mutex'es. Therefore, some boost::condition_variable where changed to boost::condition. All locks and mutexes use `#include <mutex>`. The corresponding Boost includes were removed. In some cases, this exposed issues with implicit Boost includes elsewhere. The missing explicit includes were added.
* host: Update code base using clang-tidyMartin Braun2021-03-041-2/+2
| | | | | | | | | The checks from the new clang-tidy file are applied to the source tree using: $ find . -name "*.cpp" | sort -u | xargs \ --max-procs 8 --max-args 1 clang-tidy --format-style=file \ --fix -p /path/to/compile_commands.json
* uhd: Replace usage of boost smart pointers with C++11 counterpartsMartin Braun2019-11-261-1/+1
| | | | | | | | | | | | | | | | | | | This removes the following Boost constructs: - boost::shared_ptr, boost::weak_ptr - boost::enable_shared_from_this - boost::static_pointer_cast, boost::dynamic_pointer_cast The appropriate includes were also removed. All C++11 versions of these require #include <memory>. Note that the stdlib and Boost versions have the exact same syntax, they only differ in the namespace (boost vs. std). The modifications were all done using sed, with the exception of boost::scoped_ptr, which was replaced by std::unique_ptr. References to boost::smart_ptr were also removed. boost::intrusive_ptr is not removed in this commit, since it does not have a 1:1 mapping to a C++11 construct.
* lib: transport: apply clang-formatBrent Stapleton2019-01-181-24/+29
| | | | | | | | | | This is a continuation of 967be2a4. $ find host/lib/transport -iname *.hpp -o -iname *.cpp |\ xargs clang-format -i -style=file Skipping host/lib/transport/nirio/ because of build errors. $ git checkout host/lib/transport/nirio
* uhd: Update license headersMartin Braun2018-02-191-1/+2
| | | | | | | All copyright is now attributed to "Ettus Research, a National Instruments company". SPDX headers were also updated to latest version 3.0.
* Move all license headers to SPDX format.Martin Braun2017-12-221-12/+1
|
* Remove all boost:: namespace prefix for uint32_t, int32_t etc. (fixed-width ↵Martin Braun2016-11-081-6/+6
| | | | | | | | types) - Also removes all references to boost/cstdint.hpp and replaces it with stdint.h (The 'correct' replacement would be <cstdint>, but not all of our compilers support that).
* usb: add virtual destructors where needed; make virtual destructors ↵Michael Dickens2016-08-011-0/+6
| | | | out-of-line from class definition to reduce number of vtables emitted (according to clang).
* usb: fix interfaces to be type 'int' and endpoints to be type 'unsigned ↵Michael Dickens2016-08-011-2/+2
| | | | char' to match the libusb API.
* usb: fix 'timeout' variables to be unsigned since that is what the ↵Michael Dickens2016-08-011-1/+1
| | | | 'libusb_control_transfer' API uses.
* usb: fix 'submit' to return 'int' since that is what ↵Michael Dickens2016-08-011-7/+7
| | | | 'libusb_control_transfer' returns; otherwise 'submit' is used with the correct types internally.
* Added missing pure virtual destructors to base classesNicholas Corgan2014-09-011-1/+5
|
* usb: added timeout param and additional queriesJosh Blum2013-07-151-3/+2
|
* usb: added interface args to usb abstractionsJosh Blum2011-09-191-4/+4
|
* usrp1: tweaks + implemented other features to mimic async and inline messagesJosh Blum2011-07-021-0/+3
| | | | | | | 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...
* usb: submit should return ssize_t, usrp1: set hash before reset after fw loadJosh Blum2010-09-281-1/+1
|
* usb: work on libusb code to use a single context across all callsJosh Blum2010-09-251-53/+21
| | | | | | | | libusb allocation stuff had been moved inside of smart pointer classes to handle automatic cleanup the public device handle implementation now holds an actual libusb device inside of it needs testing - all platforms
* usb: tweaks to usb code to cleanup properly and/or in error conditionsJosh Blum2010-09-241-0/+1
|
* usrp1: Additional comments on libusb transport implemenationThomas Tsou2010-08-281-0/+7
|
* usrp1: Disable default debug output for libusb implementationsThomas Tsou2010-08-271-1/+1
|
* usrp1: Modifiy USB transport implementations to use new interfaceThomas Tsou2010-08-261-160/+10
| | | | Common libusb1 code is consolidated in the libusb base file.
* usrp1: compiling off next branchJosh Blum2010-08-151-7/+7
| | | | | | | | made usb checking changes implemented named_prop_t::extract change copied the remainder of the codec pga gain control
* usrp1: Add libusb-1.0 implementations of USB interfacesThomas Tsou2010-08-131-0/+238