eal: new function to create control threads
[dpdk.git] / lib / librte_eal / linuxapp / eal / eal_interrupts.c
index 1c20693..8fee317 100644 (file)
@@ -889,10 +889,10 @@ rte_eal_intr_init(void)
        }
 
        /* create the host thread to wait/handle the interrupt */
-       ret = pthread_create(&intr_thread, NULL,
+       ret = rte_ctrl_thread_create(&intr_thread, NULL,
                        eal_intr_thread_main, NULL);
        if (ret != 0) {
-               rte_errno = ret;
+               rte_errno = -ret;
                RTE_LOG(ERR, EAL,
                        "Failed to create thread for interrupt handling\n");
        } else {
@@ -905,7 +905,7 @@ rte_eal_intr_init(void)
                        "Failed to set thread name for interrupt handling\n");
        }
 
-       return -ret;
+       return ret;
 }
 
 static void