From 5e5c0871db3069958ae072c5a367c4467f261d3e Mon Sep 17 00:00:00 2001 From: "Matthias P. Braendli" Date: Sun, 7 Jun 2015 18:24:20 +0200 Subject: Revert priority setting for mod and UHD threads It is safer to go back to the previous state, given that several users have expressed concerns about reliability. Revert "Set priorities for modulator and UHD threads". This reverts commit c9ea7fb88809d935f3eaeee108415ff5abd17ead. --- src/OutputUHD.cpp | 14 ++++---------- 1 file changed, 4 insertions(+), 10 deletions(-) (limited to 'src/OutputUHD.cpp') diff --git a/src/OutputUHD.cpp b/src/OutputUHD.cpp index 6ad7dfd..24d206f 100644 --- a/src/OutputUHD.cpp +++ b/src/OutputUHD.cpp @@ -104,8 +104,12 @@ OutputUHD::OutputUHD( RC_ADD_PARAMETER(muting, "Mute the output by stopping the transmitter"); RC_ADD_PARAMETER(staticdelay, "Set static delay (uS) between 0 and 96000"); + // TODO: find out how to use boost::bind to give the logger to the + // uhd_msg_handler uhd::msg::register_handler(uhd_msg_handler); + uhd::set_thread_priority_safe(); + //create a usrp device MDEBUG("OutputUHD:Creating the usrp device with: %s...\n", device.str().c_str()); @@ -474,16 +478,6 @@ void UHDWorker::process() // Transmit timeout const double timeout = 20.0; - // Set thread priority to realtime - const int policy = SCHED_RR; - sched_param sp; - sp.sched_priority = sched_get_priority_min(policy); - int ret = pthread_setschedparam(pthread_self(), policy, &sp); - if (ret != 0) { - etiLog.level(error) << "Could not set priority for UHD thread:" << ret; - } - - #if FAKE_UHD == 0 uhd::stream_args_t stream_args("fc32"); //complex floats uhd::tx_streamer::sptr myTxStream = uwd->myUsrp->get_tx_stream(stream_args); -- cgit v1.2.3