]> git.droids-corp.org - dpdk.git/blobdiff - lib/librte_eal/linuxapp/eal/eal_interrupts.c
eal: new function to create control threads
[dpdk.git] / lib / librte_eal / linuxapp / eal / eal_interrupts.c
index 1c20693d9e5099cd2549b1c5c5fc35dfe5a1a248..8fee317e557f5bc6450eaaeea8902693f92ea6d1 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