diff --git a/lib/src/common/threads.c b/lib/src/common/threads.c index 024faa64a..1d35d91aa 100644 --- a/lib/src/common/threads.c +++ b/lib/src/common/threads.c @@ -86,7 +86,7 @@ bool threads_new_rt_cpu(pthread_t *thread, void *(*start_routine) (void*), void #else // All threads have normal priority except prio_offset=0,1,2,3,4 if (prio_offset >= 0 && prio_offset < 5) { - param.sched_priority = 50; + param.sched_priority = 50-prio_offset; pthread_attr_init(&attr); if (pthread_attr_setinheritsched(&attr, PTHREAD_EXPLICIT_SCHED)) { perror("pthread_attr_setinheritsched"); diff --git a/srsenb/hdr/phy/phy.h b/srsenb/hdr/phy/phy.h index d20079135..c1221b2ae 100644 --- a/srsenb/hdr/phy/phy.h +++ b/srsenb/hdr/phy/phy.h @@ -83,9 +83,9 @@ private: const static int MAX_WORKERS = 4; const static int DEFAULT_WORKERS = 2; - const static int PRACH_WORKER_THREAD_PRIO = 80; + const static int PRACH_WORKER_THREAD_PRIO = 3; const static int SF_RECV_THREAD_PRIO = 1; - const static int WORKERS_THREAD_PRIO = 0; + const static int WORKERS_THREAD_PRIO = 2; srslte::radio *radio_handler; srslte::log *log_h; diff --git a/srsue/hdr/phy/phy.h b/srsue/hdr/phy/phy.h index fa3ed2fee..04599c11a 100644 --- a/srsue/hdr/phy/phy.h +++ b/srsue/hdr/phy/phy.h @@ -159,7 +159,7 @@ private: const static int DEFAULT_WORKERS = 2; const static int SF_RECV_THREAD_PRIO = 1; - const static int WORKERS_THREAD_PRIO = 0; + const static int WORKERS_THREAD_PRIO = 2; srslte::radio_multi *radio_handler; std::vector log_vec;