| USRP Hardware Driver and Device Manual Version: 4.10.0.0 UHD and USRP Manual |

Loading...
Searching...
No Matches
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
35 UHD_API void set_thread_priority(
36 float priority = DEFAULT_THREAD_PRIORITY, bool realtime = true);
37
43 UHD_API bool set_thread_priority_safe(
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
#define UHD_API
Definition config.h:87
config.hpp
uhd
Definition build_info.hpp:12
uhd::set_thread_priority_safe
UHD_API bool set_thread_priority_safe(float priority=DEFAULT_THREAD_PRIORITY, bool realtime=true)
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::set_thread_affinity
UHD_API void set_thread_affinity(const std::vector< size_t > &cpu_affinity_list)
uhd::DEFAULT_THREAD_PRIORITY
constexpr float DEFAULT_THREAD_PRIORITY
Definition thread.hpp:17