USRP Hardware Driver and USRP Manual  Version: 4.6.0.0
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
UHD_API void set_thread_affinity(const std::vector< size_t > &cpu_affinity_list)
Definition: build_info.hpp:12
UHD_API bool set_thread_priority_safe(float priority=DEFAULT_THREAD_PRIORITY, bool realtime=true)
UHD_API void set_thread_name(boost::thread *thread, const std::string &name)
#define UHD_API
Definition: config.h:87
UHD_API void set_thread_priority(float priority=DEFAULT_THREAD_PRIORITY, bool realtime=true)
constexpr float DEFAULT_THREAD_PRIORITY
Definition: thread.hpp:17