diff options
author | Matias Elo <matias.elo@nokia.com> | 2020-09-04 13:08:28 +0300 |
---|---|---|
committer | Matias Elo <matias.elo@nokia.com> | 2020-09-07 14:45:19 +0300 |
commit | 7495507579e16245e74f6878af5d0596a389be83 (patch) | |
tree | 7c2d061b238485c836393749355f0d098547dbf3 /helper | |
parent | 4eda07880e2ac33904c6d786e6d8491f15587b0d (diff) |
helper: thread: print pthread_create() return value to error log
Print pthread_create() return value to error log on failure.
Signed-off-by: Matias Elo <matias.elo@nokia.com>
Reviewed-by: Petri Savolainen <petri.savolainen@nokia.com>
Diffstat (limited to 'helper')
-rw-r--r-- | helper/linux/thread.c | 3 | ||||
-rw-r--r-- | helper/threads.c | 2 |
2 files changed, 3 insertions, 2 deletions
diff --git a/helper/linux/thread.c b/helper/linux/thread.c index c7ed24512..3d90d794c 100644 --- a/helper/linux/thread.c +++ b/helper/linux/thread.c @@ -89,7 +89,8 @@ int odph_linux_pthread_create(odph_linux_pthread_t *pthread_tbl, _odph_run_start_routine, &pthread_tbl[i].thr_params); if (ret != 0) { - ODPH_ERR("Failed to start thread on cpu #%d\n", cpu); + ODPH_ERR("Failed to start thread on CPU #%d: %d\n", cpu, + ret); break; } diff --git a/helper/threads.c b/helper/threads.c index 431712d93..f8244a89b 100644 --- a/helper/threads.c +++ b/helper/threads.c @@ -182,7 +182,7 @@ static int create_pthread(odph_thread_t *thread, int cpu) run_thread, &thread->start_args); if (ret != 0) { - ODPH_ERR("Failed to start thread on cpu #%d\n", cpu); + ODPH_ERR("Failed to start thread on CPU #%d: %d\n", cpu, ret); thread->cpu = FAILED_CPU; return ret; } |