[dpdk-dev] [PATCH v2 1/2] eal: error number enhancement for thread TLS API
Dmitry Kozlyuk
dmitry.kozliuk at gmail.com
Tue Mar 2 18:09:12 CET 2021
2021-03-02 17:26, Tal Shnaiderman:
> add error number reporting to rte_errno in all
> functions in the rte_thread_tls_* API.
>
> Suggested-by: Anatoly Burakov <anatoly.burakov at intel.com>
> Signed-off-by: Tal Shnaiderman <talshn at nvidia.com>
> ---
> lib/librte_eal/include/rte_thread.h | 6 +++---
> lib/librte_eal/unix/rte_thread.c | 6 ++++++
> lib/librte_eal/windows/rte_thread.c | 8 +++++++-
> 3 files changed, 16 insertions(+), 4 deletions(-)
Using OS error codes for rte_errno isn't the right thing to do: this way
callers cannot write a portable check of rte_thread_*() result. Consider
returning some suitable stable values. OS-specific error info can be logged
at debug level, as it is already is some places.
More information about the dev
mailing list