From 64dd48776c57750b7df556c3ce6058219bec111c Mon Sep 17 00:00:00 2001 From: Ashish Chaudhari Date: Tue, 21 May 2019 14:06:14 -0700 Subject: utils: Added set_thread_name for std::thread --- host/include/uhd/utils/thread.hpp | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'host/include') 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 #include #include +#include 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 */ -- cgit v1.2.3