Commit graph

16 commits

Author SHA1 Message Date
Martin Braun
876d4150aa uhd: Apply clang-format against all .cpp and .hpp files in host/
Note: template_lvbitx.{cpp,hpp} need to be excluded from the list of
files that clang-format gets applied against.
2020-03-03 08:51:32 -06:00
Martin Braun
0a65fc5af1 utils: tasks: Use uhd::set_thread_name()
This is a more portable option to set thread names. References to
pthreads are now limited to thread.cpp, where they belong.
2019-11-26 12:21:35 -08:00
Martin Braun
d3a16b7022 uhd: Replace all occurrences of boost::bind with std::bind
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.
2019-11-26 12:21:32 -08:00
Martin Braun
ae5211d71d uhd: Update license headers
All copyright is now attributed to "Ettus Research, a National
Instruments company".

SPDX headers were also updated to latest version 3.0.
2018-02-19 16:54:52 -08:00
Martin Braun
4f948e2c8b Move all license headers to SPDX format. 2017-12-22 10:45:51 -08:00
Andrej Rode
c33928d2bb utils: add set_thread_name API call, move thread_priority to thread 2017-06-29 13:43:05 -07:00
Martin Braun
cb1649d201 uhd: tasks now use std::threads under the hood, and can't be interrupted
USRP1 and USRP2 used tasks that relied on Boost thread interruption
mechanisms. These were replaced with explicit atomics.
2017-06-28 15:54:39 -07:00
Martin Braun
c3beb6d1ec Merge branch 'maint' 2017-05-03 15:59:47 -07:00
Andrej Rode
d2a354bbe4 uhd: cast thread_group.create_thread() return value to void to avoid memory leak 2017-04-25 17:15:13 -07:00
Andrej Rode
21aad77c9c utils: introduce new logging API and remove msg API 2017-02-20 17:13:15 -08:00
Martin Braun
99c2730bc9 Remove all boost:: namespace prefix for uint32_t, int32_t etc. (fixed-width 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).
2016-11-08 08:02:22 -08:00
Nicholas Corgan
654c5b06c0 Added missing pure virtual destructors to base classes 2014-09-01 17:58:24 +02:00
Johannes Demel
25660c5c9e b200/dtor-stall: fixed bug that stalled b200 on shutdown. 2013-11-19 12:33:22 -08:00
Josh Blum
1e9ff6fb0e uhd: make spawn barrier a member of a task (see notes)
On OSX w/ boost 1.47, this general area of code was inconsistently barfing w/ lock error.
Perhaps its a boost bug, in any case, using it this way seems to solve the problem.
2011-07-26 11:15:04 -07:00
Josh Blum
c0764b44e3 uhd: exit task on the catch-all exceptions, and dont print anything 2011-07-25 18:22:18 -07:00
Josh Blum
7e1b2a0e3c uhd: added tasks to simplify thread spawning use cases 2011-07-13 17:25:40 -07:00