X-Git-Url: https://gerrit.o-ran-sc.org/r/gitweb?p=o-du%2Fphy.git;a=blobdiff_plain;f=fhi_lib%2Flib%2Fsrc%2Fxran_main.c;h=0f4bf8f7dbcfa49bc94a5cd31fa6abee0fa4609c;hp=7b77361a5ee007edbf0f603b75bad1c3085933b1;hb=3857f3f735f44c156ba261db0fdf10e2f4011510;hpb=afaa7b205ebe18aaa4ddb2cea457c647df2a3444 diff --git a/fhi_lib/lib/src/xran_main.c b/fhi_lib/lib/src/xran_main.c index 7b77361..0f4bf8f 100644 --- a/fhi_lib/lib/src/xran_main.c +++ b/fhi_lib/lib/src/xran_main.c @@ -2325,7 +2325,14 @@ int32_t xran_init(int argc, char *argv[], struct xran_io_loop_cfg *p_io_cfg = (struct xran_io_loop_cfg *)&p_xran_fh_init->io_cfg; struct xran_device_ctx * p_xran_dev_ctx = xran_dev_get_ctx(); - int32_t lcore_id = 0; + cpu_set_t system_cpuset; + pthread_getaffinity_np(pthread_self(), sizeof(cpu_set_t), &system_cpuset); + for (j = 0; j < CPU_SETSIZE; j++) + if (CPU_ISSET(j, &system_cpuset)) + break; + + int32_t lcore_id = j; + char filename[64]; int64_t offset_sec, offset_nsec;