1. Update Dockerfile for CI build. But there is dependency on Intel System Studio...
[o-du/phy.git] / fhi_lib / lib / src / xran_main.c
index 7b77361..0f4bf8f 100644 (file)
@@ -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;\r
     struct xran_device_ctx * p_xran_dev_ctx = xran_dev_get_ctx();\r
 \r
-    int32_t  lcore_id = 0;\r
+    cpu_set_t system_cpuset;\r
+    pthread_getaffinity_np(pthread_self(), sizeof(cpu_set_t), &system_cpuset);\r
+    for (j = 0; j < CPU_SETSIZE; j++)\r
+        if (CPU_ISSET(j, &system_cpuset))\r
+            break;\r
+\r
+    int32_t  lcore_id = j;\r
+\r
     char filename[64];\r
     int64_t offset_sec, offset_nsec;\r
 \r