Loading...
Searching...
No Matches
thread.hpp
Go to the documentation of this file.
//
// Copyright 2010,2017 Ettus Research LLC
// Copyright 2018 Ettus Research, a National Instruments Company
//
// SPDX-License-Identifier: GPL-3.0-or-later
//
#pragma once
#include <uhd/config.hpp>
#include <boost/thread/thread.hpp>
#include <string>
#include <thread>
namespace uhd {
constexpr float DEFAULT_THREAD_PRIORITY = float(0.5);
UHD_API void set_thread_priority(
float priority = DEFAULT_THREAD_PRIORITY, bool realtime = true);
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_name(std::thread* thread, const std::string& name);
UHD_API void set_thread_affinity(const std::vector<size_t>& cpu_affinity_list);
} // 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