Thread (36 messages) 36 messages, 6 authors, 2021-02-11

Re: [dpdk-dev] [PATCH v9 2/2] eal: add generic thread-local-storage functions

From: Medvedkin, Vladimir <hidden>
Date: 2021-02-10 14:26:45

Hi Tal,

On 10/02/2021 13:33, Burakov, Anatoly wrote:
On 06-Jan-21 8:35 PM, Tal Shnaiderman wrote:
quoted
Add support for TLS functionality in EAL.

The following functions are added:
rte_thread_tls_key_create - create a TLS data key.
rte_thread_tls_key_delete - delete a TLS data key.
rte_thread_tls_value_set - set value bound to the TLS key
rte_thread_tls_value_get - get value bound to the TLS key

TLS key is defined by the new type rte_tls_key.
I would suggest changing rte_tls_key to rte_thread_tls_key so that it is 
consistent with the API and not confused with transport layer security.
quoted
The API allocates the thread local storage (TLS) key.
Any thread of the process can subsequently use this key
to store and retrieve values that are local to the thread.

Those functions are added in addition to TLS capability
in rte_per_lcore.h to allow abstraction of the pthread
layer for all operating systems.

Windows implementation is under librte_eal/windows and
implemented using WIN32 API for Windows only.

Unix implementation is under librte_eal/unix and
implemented using pthread for UNIX compilation.

Signed-off-by: Tal Shnaiderman <redacted>
---
-- 
Regards,
Vladimir
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help