aboutsummaryrefslogtreecommitdiffstats
path: root/host/include
diff options
context:
space:
mode:
authorAaron Rossetto <aaron.rossetto@ni.com>2019-10-02 16:35:06 -0500
committerMartin Braun <martin.braun@ettus.com>2019-11-26 11:49:10 -0800
commit93d8c6f83b35ca08b009a02b7109e09f4e4e43b1 (patch)
tree622595b8753b7a8733ead4fa440888514d434cbe /host/include
parent1ee9529abdf32be8ff254114a108aeb14534cf98 (diff)
downloaduhd-93d8c6f83b35ca08b009a02b7109e09f4e4e43b1.tar.gz
uhd-93d8c6f83b35ca08b009a02b7109e09f4e4e43b1.tar.bz2
uhd-93d8c6f83b35ca08b009a02b7109e09f4e4e43b1.zip
uhd: Add thread affinity utility functions
Diffstat (limited to 'host/include')
-rw-r--r--host/include/uhd/utils/thread.hpp6
1 files changed, 6 insertions, 0 deletions
diff --git a/host/include/uhd/utils/thread.hpp b/host/include/uhd/utils/thread.hpp
index 05cba0d14..aeb27e467 100644
--- a/host/include/uhd/utils/thread.hpp
+++ b/host/include/uhd/utils/thread.hpp
@@ -56,6 +56,12 @@ 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);
+/*!
+ * Set the affinity of the current thread to a (set of) CPU(s).
+ * \param cpu_affinity_list list of CPU numbers to affinitize the thread to
+ */
+UHD_API void set_thread_affinity(const std::vector<size_t>& cpu_affinity_list);
+
} // namespace uhd
#endif /* INCLUDED_UHD_UTILS_THREAD_HPP */