X-Git-Url: http://git.droids-corp.org/?a=blobdiff_plain;f=lib%2Flibrte_eal%2Fcommon%2Feal_common_thread.c;h=48ef4d6de6308efa993d3d2135c206d720c28f6a;hb=c99a2d4c6b7f;hp=8110ac2ae15c71d4779e641603c0ade0eb3e24aa;hpb=368a91d6bdc8225c585044b4e7debcd3e5fdc0d4;p=dpdk.git diff --git a/lib/librte_eal/common/eal_common_thread.c b/lib/librte_eal/common/eal_common_thread.c index 8110ac2ae1..48ef4d6de6 100644 --- a/lib/librte_eal/common/eal_common_thread.c +++ b/lib/librte_eal/common/eal_common_thread.c @@ -175,7 +175,7 @@ rte_ctrl_thread_create(pthread_t *thread, const char *name, params = malloc(sizeof(*params)); if (!params) - return -1; + return -ENOMEM; params->start_routine = start_routine; params->arg = arg; @@ -185,7 +185,7 @@ rte_ctrl_thread_create(pthread_t *thread, const char *name, ret = pthread_create(thread, attr, rte_thread_init, (void *)params); if (ret != 0) { free(params); - return ret; + return -ret; } if (name != NULL) { @@ -228,5 +228,5 @@ fail: } pthread_cancel(*thread); pthread_join(*thread, NULL); - return ret; + return -ret; }