USRP Hardware Driver and USRP Manual Version: 4.1.0.3
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
15namespace uhd {
16
17constexpr 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
51UHD_API void set_thread_name(boost::thread* thread, const std::string& name);
52
58UHD_API void set_thread_name(std::thread* thread, const std::string& name);
59
64UHD_API void set_thread_affinity(const std::vector<size_t>& cpu_affinity_list);
65
66} // namespace uhd
#define UHD_API
Definition: config.h:70
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)
UHD_API void set_thread_priority(float priority=DEFAULT_THREAD_PRIORITY, bool realtime=true)
UHD_API void set_thread_affinity(const std::vector< size_t > &cpu_affinity_list)
constexpr float DEFAULT_THREAD_PRIORITY
Definition: thread.hpp:17