From dd3b3caf32f4a578aa90a7797beabff6af2a5bcc Mon Sep 17 00:00:00 2001 From: Robert Schmidt Date: Thu, 23 Nov 2023 13:53:45 +0100 Subject: [PATCH] Sync PNF through the radio The radio gives the clock. Therefore, we do not need to keep the time separately in the PNF. Also, the VNF should not run the ru_thread, as this is an L1 thread. --- executables/nr-ru.c | 22 ---------------------- 1 file changed, 22 deletions(-) diff --git a/executables/nr-ru.c b/executables/nr-ru.c index 90d7e235de..23694fc461 100644 --- a/executables/nr-ru.c +++ b/executables/nr-ru.c @@ -1216,29 +1216,7 @@ void *ru_thread(void *param) struct timespec slot_start; clock_gettime(CLOCK_MONOTONIC, &slot_start); - struct timespec slot_duration; - slot_duration.tv_sec = 0; - //slot_duration.tv_nsec = 0.5e6; - slot_duration.tv_nsec = 0.5e6; - - - while (!oai_exit) { - - if (NFAPI_MODE==NFAPI_MODE_VNF || NFAPI_MODE == NFAPI_MODE_AERIAL ) { - // We should make a VNF main loop with proper tasks calls in case of VNF - slot_start = timespec_add(slot_start,slot_duration); - struct timespec curr_time; - clock_gettime(CLOCK_MONOTONIC, &curr_time); - struct timespec sleep_time; - - if((slot_start.tv_sec > curr_time.tv_sec) || - (slot_start.tv_sec == curr_time.tv_sec && slot_start.tv_nsec > curr_time.tv_nsec)){ - sleep_time = timespec_sub(slot_start,curr_time); - usleep(sleep_time.tv_nsec * 1e-3); - } - } - if (slot==(fp->slots_per_frame-1)) { slot=0; frame++;