aboutsummaryrefslogtreecommitdiffstats
path: root/host/lib/usrp/usrp1/soft_time_ctrl.cpp
Commit message (Collapse)AuthorAgeFilesLines
* host: Update code base using clang-tidyMartin Braun2021-03-041-8/+8
| | | | | | | | | 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: Apply clang-format against all .cpp and .hpp files in host/Martin Braun2020-03-031-82/+100
| | | | | Note: template_lvbitx.{cpp,hpp} need to be excluded from the list of files that clang-format gets applied against.
* uhd: Replace all occurrences of boost::bind with std::bindMartin Braun2019-11-261-4/+5
| | | | | | | | | | | | | | | | | | | | | Note: Replacing everything with a lambda would be even better, but that can't be easily scripted so we'll do this as a first step to reduce the Boost footprint. This also removes occurences of #include <boost/bind.hpp>, and makes sure all usages of std::bind have an #include <functional>. clang-format wasn't always applied to minimize the changeset in this commit, however, it was applied to the blocks of #includes. Due to conflicts with other Boost libraries, the placeholders _1, _2, etc. could not be directly used, but had to be explicitly called out (as std::placeholders::_1, etc.). This makes the use of std::bind even uglier, which serves as another reminder that using std::bind (and even more so, boost::bind) should be avoided. nirio/rpc/rpc_client.cpp still contains a reference to boost::bind. It was not possible to remove it by simply doing a search and replace, so it will be removed in a separate commit.
* uhd: Replace usage of boost smart pointers with C++11 counterpartsMartin Braun2019-11-261-4/+4
| | | | | | | | | | | | | | | | | | | 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.
* uhd: Add UHD_FALLTHROUGH attributeMartin Braun2019-08-161-0/+1
| | | | | | | | | | | | | | | | | This provides a platform-independent attribute to allow fallthroughs in switch statements. Example: switch (foo) { case BAR: do_something(); UHD_FALLTHROUGH case BAZ: do_another_thing(); } The usage of UHD_FALLTHROUGH will avoid a compiler warning if indeed the fallthrough was intentional. The associated warning (-Wimplicit-fallthrough) is only available on gcc and Clang.
* lib: move atomic.hpp and system_time.hpp to uhdlibMartin Braun2018-04-061-1/+1
|
* uhd: Moved get_system_time outside of public APIMartin Braun2018-03-051-2/+3
| | | | | | | uhd::get_system_time() is an abstracted way of reading back a time, and is not UHD-specific. As such, there's no reason to keep it in the public part of the API where we're contractually obligated not to touch it. Instead, moving it to the internal API space.
* 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
|
* uhd: tasks now use std::threads under the hood, and can't be interruptedMartin Braun2017-06-281-2/+3
| | | | | USRP1 and USRP2 used tasks that relied on Boost thread interruption mechanisms. These were replaced with explicit atomics.
* Added missing pure virtual destructors to base classesNicholas Corgan2014-09-011-1/+5
|
* usrp1: stop threads in deconstructorJosh Blum2012-03-291-1/+5
| | | | | | | | | | | | | | | Its important to stop the threads before we let the other smart point objects naturally deconstruct to avoid thread-based race conditions. The attempt to deconstruct the tree and soft time ctrl had a bug because the tree had references in subtrees within the dboard manager class. Rather than continue to fix this method and deconstruct the tree to free up soft time ctrl, it seems simpler to just stop the thread in soft time ctrl, and then let it naturally deconstruct later by ref count.
* uhd: various tweaks for compiler warns and valgrindJosh Blum2012-02-091-2/+2
|
* usrp1: various tweaks related to streamingJosh Blum2011-11-031-4/+3
|
* uhd: added tasks to simplify thread spawning use casesJosh Blum2011-07-131-22/+7
|
* usrp: handle frontend swapping if the first subdev is QI or QJosh Blum2011-07-041-5/+5
|
* uhd: added inline message testing to the messages exampleJosh Blum2011-07-031-2/+9
| | | | | | | Renamed the example to test_messages (not just async). Fixed bug in super recv packet handler related to messages. Basically, the sequence number for messages should be ignored. Fixed some quirks with usrp1 soft time control to get it work as well.
* usrp1: tweaks + implemented other features to mimic async and inline messagesJosh Blum2011-07-021-9/+39
| | | | | | | 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...
* uhd: implemented boost barriers on all code that creates threadsJosh Blum2011-03-311-6/+8
| | | | | | | | | The barrier ensures that the thread must spawn before the caller exits. Some of the code already used a mutex to accomplish this, however cygwin chokes when a mutex is locked twice by the same thread. Mutex implementations were replaced with the barrier implementation. Also the barrier implementation is far cleaner.
* uhd: change bounded_buffer implementation and code using itJosh Blum2011-02-051-4/+4
| | | | | | | The bounded buffer now uses the detail idiom to hide implementation to inline better. The whole sptr/make idiom was removed from bounded buffer to just construct directly. The code using bounded buffer was changed for the new api: replaces access operators and calls to the factory function.
* uhd: use time spec get_system_time to simplify soft time controlJosh Blum2011-01-301-29/+8
|
* usrp1: changes that make benchmark rx workJosh Blum2011-01-241-0/+3
| | | | | | initialize the time to something in soft time control use std::max(0, lost) because the time is emulated, lost can be negative which means huge positive unsigned...
* uhd: added docs on usrp2/n, removed empty n2xx doc page, miscJosh Blum2011-01-241-2/+0
|
* usrp1: set eob on md when shutting off receiver, because we canJosh Blum2011-01-181-0/+1
|
* usrp1: work on usrp1 hardware compat with the apiJosh Blum2011-01-171-39/+83
| | | | | | today we added shutoff the DAC when not transmitting using EOB as an indicator added various other features and cleaned up code for soft time control
* usrp1: implement soft time ctrl for send at, recv atJosh Blum2011-01-131-0/+179