eal: set name when creating a control thread
[dpdk.git] / lib / librte_eal / linuxapp / eal / eal_vfio_mp_sync.c
index 05d63e8..a20fb86 100644 (file)
 #endif
 
 #include <rte_log.h>
-#include <rte_pci.h>
 #include <rte_eal_memconfig.h>
 #include <rte_malloc.h>
 #include <rte_vfio.h>
 
 #include "eal_filesystem.h"
-#include "eal_pci_init.h"
 #include "eal_vfio.h"
 #include "eal_thread.h"
 
@@ -405,7 +403,8 @@ vfio_mp_sync_setup(void)
                return -1;
        }
 
-       ret = pthread_create(&socket_thread, NULL,
+       snprintf(thread_name, sizeof(thread_name), "vfio-sync");
+       ret = rte_ctrl_thread_create(&socket_thread, thread_name, NULL,
                        vfio_mp_sync_thread, NULL);
        if (ret) {
                RTE_LOG(ERR, EAL,
@@ -414,13 +413,6 @@ vfio_mp_sync_setup(void)
                return -1;
        }
 
-       /* Set thread_name for aid in debugging. */
-       snprintf(thread_name, RTE_MAX_THREAD_NAME_LEN, "vfio-sync");
-       ret = rte_thread_setname(socket_thread, thread_name);
-       if (ret)
-               RTE_LOG(DEBUG, EAL,
-                       "Failed to set thread name for secondary processes!\n");
-
        return 0;
 }