Re: [dpdk-dev] [PATCH v16 1/9] eal: add basic threading functions
From: Thomas Monjalon <hidden>
Date: 2021-10-12 16:09:18
09/10/2021 09:41, Narcisa Ana Maria Vasile:
From: Narcisa Vasile <redacted>
Use a portable, type-safe representation for the thread identifier.
Add functions for comparing thread ids and obtaining the thread id
for the current thread.
Signed-off-by: Narcisa Vasile <redacted>
---
lib/eal/common/meson.build | 1 +
lib/eal/{unix => common}/rte_thread.c | 57 ++++++++++++++++-----------There is no explanation about this move.
lib/eal/include/rte_thread.h | 48 +++++++++++++++++-----
lib/eal/unix/meson.build | 1 -
lib/eal/version.map | 3 ++
lib/eal/windows/rte_thread.c | 17 ++++++++
6 files changed, 95 insertions(+), 32 deletions(-)
rename lib/eal/{unix => common}/rte_thread.c (66%)[...]
- err = pthread_key_create(&((*key)->thread_index), destructor);
- if (err) {
+ err = pthread_key_create(&(k->thread_index), destructor);
+ if (err != 0) {It looks wrong to call pthread functions in a "common" file.