From 7d058eb0d08f6d102f53a3afacd260d8b0106e5b Mon Sep 17 00:00:00 2001 From: Bartosz Podrygajlo Date: Thu, 5 Mar 2026 16:08:15 +0100 Subject: [PATCH] Run nrue_ru_start in a high priority thread Launch a temporary high-priority thread to start the UE RU, ensuring radio library threads inherit this priority --- executables/nr-uesoftmodem.c | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/executables/nr-uesoftmodem.c b/executables/nr-uesoftmodem.c index 1631332e5e..df4088a87d 100644 --- a/executables/nr-uesoftmodem.c +++ b/executables/nr-uesoftmodem.c @@ -240,6 +240,13 @@ static void trigger_deregistration(int sig) } } +void *nrue_ru_start_thread(void *arg) +{ + (void)arg; + nrue_ru_start(); + return NULL; +} + int NB_UE_INST = 1; configmodule_interface_t *uniqCfg = NULL; nrLDPC_coding_interface_t nrLDPC_coding_interface = {0}; @@ -450,7 +457,11 @@ int main(int argc, char **argv) load_module_shlib("imscope_record", NULL, 0, PHY_vars_UE_g[0][0]); } - nrue_ru_start(); + // Launch a temporary high-priority thread to start the UE RU, ensuring radio library threads inherit this priority + pthread_t ru_start_thread; + threadCreate(&ru_start_thread, nrue_ru_start_thread, NULL, "ru_start_thread", -1, OAI_PRIORITY_RT_MAX); + int ret = pthread_join(ru_start_thread, NULL); + AssertFatal(ret == 0, "pthread_join error %d, errno %d (%s)\n", ret, errno, strerror(errno)); for (int inst = 0; inst < NB_UE_INST; inst++) { LOG_I(PHY,"Intializing UE Threads for instance %d ...\n", inst);