From 1c79742231c5cc3609e35bda34c8d9b9e7440f50 Mon Sep 17 00:00:00 2001 From: Ciro Nishiguchi Date: Tue, 6 Aug 2019 14:44:51 -0500 Subject: utils: remove thread priority elevation Remove UHD call to elevate thread priority to realtime from utils, and add warning in documentation of set_thread_priority function. Setting all threads to the same realtime priority can cause the threads to not share access to the network interface fairly, which adversely affects operation of the worker threads in UHD. --- host/include/uhd/utils/thread.hpp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'host/include') diff --git a/host/include/uhd/utils/thread.hpp b/host/include/uhd/utils/thread.hpp index aeb27e467..9f71161d0 100644 --- a/host/include/uhd/utils/thread.hpp +++ b/host/include/uhd/utils/thread.hpp @@ -20,8 +20,10 @@ static const float default_thread_priority = float(0.5); /*! * Set the scheduling priority on the current thread. * - * A new thread or calling process should make this call - * with the defaults this to enable realtime scheduling. + * To enable realtime scheduling on a new thread, call this function with + * the default values. Warning: realtime scheduling can cause UHD worker + * threads to not share resources such as network interfaces fairly, + * potentially causing it to malfunction. * * A priority of zero corresponds to normal priority. * Positive priority values are higher than normal. -- cgit v1.2.3