[USRP-users] setting thread priority during multi threading

Marcus Müller marcus.mueller at ettus.com
Wed Apr 29 06:09:19 EDT 2015


Hi Kamal,

is this thread related to "[USRP-users] Timeout while streaming error
while implementing receiving samples in different thread"?
If that's the case, at least we now know where the Timeout occurred
message comes from :)
>     Please see the general application notes in the manual for
> instructions.
You can find the UHD/USRP manual at
http://files.ettus.com/manual
and these are the general application notes:
http://files.ettus.com/manual/page_general.html
and what you're looking for is under threading notes/threading priority:
http://files.ettus.com/manual/page_general.html#general_threading_prio

> I'm also getting Timeout while streaming error(ERROR_CODE_TIMEOUT)
> when executed. kindly tl me why this error is coming. I didn't  get
> this error when i was running rx_samples_to_file.cpp without threading.
>
I'd recommend we keep that discussion in the aforementioned thread,
because this will get far too confusing if we mix these topics here.

Best regards,
Marcus



On 04/29/2015 11:17 AM, kamal kumar jeldi via USRP-users wrote:
> Hi All,
>
> I am working with rx_samples_to_file.cpp code, I have implemented
> multi threading in order to receive the data and to process it. I am
> creating three threads( UHD_SAFE_MAIN thread, DataAcqusitionThread,
> DataProcessingThread). I didn't set any priority to the above three
> threads. I'm getting the following warning during execution.
> UHD Warning:
>     Unable to set the thread priority. Performance may be negatively
> affected.
>     Please see the general application notes in the manual for
> instructions.
>     EnvironmentError: OSError: error in pthread_setschedparam.
>
>
> I have been set main thread priority to
> highest.(uhd::set_thread_priority_safe(1.0, true)), DataAcquistion
> Thread to second priority(uhd::set_thread_priority_safe(0.75, true))
> and Processing thread(uhd::set_thread_priority_safe(0.5, true)) to
> least by placing uhd::set_thread_priority_safe(priority_value,
> real_time) in their respective functions. Still I'm getting the UHD
> Warning as above until and unless i keep real_time value to false.
> Kindly explain the working of set_thread_priority_safe(). How can i
> handle these threads synchronously?
>
> I'm also getting Timeout while streaming error(ERROR_CODE_TIMEOUT)
> when executed. kindly tl me why this error is coming. I didn't  get
> this error when i was running rx_samples_to_file.cpp without threading.
>
> wbrs,
> kamal.
>
>
>
>
>
> _______________________________________________
> USRP-users mailing list
> USRP-users at lists.ettus.com
> http://lists.ettus.com/mailman/listinfo/usrp-users_lists.ettus.com

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.ettus.com/pipermail/usrp-users_lists.ettus.com/attachments/20150429/1ad35727/attachment-0002.html>


More information about the USRP-users mailing list