USRP Hardware Driver and USRP Manual  Version: 4.4.0.HEAD-0-g5fac246b
UHD and USRP Manual
thread.hpp
Go to the documentation of this file.
1 //
2 // Copyright 2010,2017 Ettus Research LLC
3 // Copyright 2018 Ettus Research, a National Instruments Company
4 //
5 // SPDX-License-Identifier: GPL-3.0-or-later
6 //
7 
8 #pragma once
9 
10 #include <uhd/config.hpp>
11 #include <boost/thread/thread.hpp>
12 #include <string>
13 #include <thread>
14 
15 namespace uhd {
16 
17 constexpr float DEFAULT_THREAD_PRIORITY = float(0.5);
18 
36  float priority = DEFAULT_THREAD_PRIORITY, bool realtime = true);
37 
44  float priority = DEFAULT_THREAD_PRIORITY, bool realtime = true);
45 
51 UHD_API void set_thread_name(boost::thread* thread, const std::string& name);
52 
58 UHD_API void set_thread_name(std::thread* thread, const std::string& name);
59 
64 UHD_API void set_thread_affinity(const std::vector<size_t>& cpu_affinity_list);
65 
66 } // namespace uhd
config.hpp
uhd::set_thread_priority_safe
UHD_API bool set_thread_priority_safe(float priority=DEFAULT_THREAD_PRIORITY, bool realtime=true)
uhd::DEFAULT_THREAD_PRIORITY
constexpr float DEFAULT_THREAD_PRIORITY
Definition: thread.hpp:17
uhd::set_thread_name
UHD_API void set_thread_name(boost::thread *thread, const std::string &name)
uhd::set_thread_priority
UHD_API void set_thread_priority(float priority=DEFAULT_THREAD_PRIORITY, bool realtime=true)
UHD_API
#define UHD_API
Definition: config.h:87
uhd::set_thread_affinity
UHD_API void set_thread_affinity(const std::vector< size_t > &cpu_affinity_list)
uhd
Definition: build_info.hpp:12