aboutsummaryrefslogtreecommitdiffstats
path: root/host/include
diff options
context:
space:
mode:
authorAshish Chaudhari <ashish@ettus.com>2019-05-21 14:06:14 -0700
committerMartin Braun <martin.braun@ettus.com>2019-11-26 11:49:08 -0800
commit64dd48776c57750b7df556c3ce6058219bec111c (patch)
treef0237af95c22d60e29e40d9561587f62c6e957dc /host/include
parent96a19dc03fe465f101853e1de9369780445f1724 (diff)
downloaduhd-64dd48776c57750b7df556c3ce6058219bec111c.tar.gz
uhd-64dd48776c57750b7df556c3ce6058219bec111c.tar.bz2
uhd-64dd48776c57750b7df556c3ce6058219bec111c.zip
utils: Added set_thread_name for std::thread
Diffstat (limited to 'host/include')
-rw-r--r--host/include/uhd/utils/thread.hpp8
1 files changed, 8 insertions, 0 deletions
diff --git a/host/include/uhd/utils/thread.hpp b/host/include/uhd/utils/thread.hpp
index c7358040e..05cba0d14 100644
--- a/host/include/uhd/utils/thread.hpp
+++ b/host/include/uhd/utils/thread.hpp
@@ -11,6 +11,7 @@
#include <uhd/config.hpp>
#include <boost/thread/thread.hpp>
#include <string>
+#include <thread>
namespace uhd {
@@ -48,6 +49,13 @@ UHD_API bool set_thread_priority_safe(
*/
UHD_API void set_thread_name(boost::thread* thread, const std::string& name);
+/*!
+ * Set the thread name on the given std thread.
+ * \param thread pointer to a boost thread
+ * \param name thread name with maximum length of 16 characters
+ */
+UHD_API void set_thread_name(std::thread* thread, const std::string& name);
+
} // namespace uhd
#endif /* INCLUDED_UHD_UTILS_THREAD_HPP */