aboutsummaryrefslogtreecommitdiffstats
path: root/host
diff options
context:
space:
mode:
authorMartin Braun <martin.braun@ettus.com>2019-11-22 10:41:48 -0800
committerMartin Braun <martin.braun@ettus.com>2019-11-26 12:21:35 -0800
commit6a6d5998f82d97ae754895e3e6f35d3b4bd2cb53 (patch)
treefd957e19d700e3de0006efcaa48b002207f97672 /host
parentc7ee53d04123044bab1f7ad61cce742558751c66 (diff)
downloaduhd-6a6d5998f82d97ae754895e3e6f35d3b4bd2cb53.tar.gz
uhd-6a6d5998f82d97ae754895e3e6f35d3b4bd2cb53.tar.bz2
uhd-6a6d5998f82d97ae754895e3e6f35d3b4bd2cb53.zip
mpmd: Name the claimer task thread
We call set_thread_name() on the claimer loop so the thread can be identified using OS utilities.
Diffstat (limited to 'host')
-rw-r--r--host/lib/usrp/mpmd/mpmd_mboard_impl.cpp28
1 files changed, 15 insertions, 13 deletions
diff --git a/host/lib/usrp/mpmd/mpmd_mboard_impl.cpp b/host/lib/usrp/mpmd/mpmd_mboard_impl.cpp
index 98e92e210..4268a90ba 100644
--- a/host/lib/usrp/mpmd/mpmd_mboard_impl.cpp
+++ b/host/lib/usrp/mpmd/mpmd_mboard_impl.cpp
@@ -372,20 +372,22 @@ uhd::task::sptr mpmd_mboard_impl::claim_device_and_make_task()
UHD_LOG_WARNING("MPMD", "Could not read back log queue!");
}
}
- return uhd::task::make([this] {
- auto now = std::chrono::steady_clock::now();
- if (not this->claim()) {
- throw uhd::value_error("mpmd device reclaiming loop failed!");
- } else {
- try {
- this->dump_logs();
- } catch(const uhd::runtime_error&) {
- UHD_LOG_WARNING("MPMD", "Could not read back log queue!");
+ return uhd::task::make(
+ [this] {
+ auto now = std::chrono::steady_clock::now();
+ if (not this->claim()) {
+ throw uhd::value_error("mpmd device reclaiming loop failed!");
+ } else {
+ try {
+ this->dump_logs();
+ } catch (const uhd::runtime_error&) {
+ UHD_LOG_WARNING("MPMD", "Could not read back log queue!");
+ }
}
- }
- std::this_thread::sleep_until(
- now + std::chrono::milliseconds(MPMD_RECLAIM_INTERVAL_MS));
- });
+ std::this_thread::sleep_until(
+ now + std::chrono::milliseconds(MPMD_RECLAIM_INTERVAL_MS));
+ },
+ "mpmd_claimer_task");
}
void mpmd_mboard_impl::dump_logs(const bool dump_to_null)