[dpdk-dev] [PATCH v2 2/2] eal: rename key opaque pointer in TLS API
Tal Shnaiderman
talshn at nvidia.com
Thu Mar 4 12:16:28 CET 2021
> Subject: RE: [PATCH v2 2/2] eal: rename key opaque pointer in TLS API
>
> External email: Use caution opening links or attachments
>
>
> > From: Tal Shnaiderman [mailto:talshn at nvidia.com]
> > Sent: Tuesday, March 2, 2021 4:27 PM
> >
> > rename the key opaque pointer from rte_tls_key to rte_thread_key to
> > avoid confusion with transport layer security.
> >
> > Suggested-by: Vladimir Medvedkin <vladimir.medvedkin at intel.com>
> > Signed-off-by: Tal Shnaiderman <talshn at nvidia.com>
>
> [...]
>
> > diff --git a/lib/librte_eal/include/rte_thread.h
> > b/lib/librte_eal/include/rte_thread.h
> > index 39737d1829..e44be3d252 100644
> > --- a/lib/librte_eal/include/rte_thread.h
> > +++ b/lib/librte_eal/include/rte_thread.h
> > @@ -23,7 +23,7 @@ extern "C" {
> > /**
> > * TLS key type, an opaque pointer.
> > */
> > -typedef struct eal_tls_key *rte_tls_key;
> > +typedef struct eal_tls_key *rte_thread_key;
>
> Yes.
>
> >
> > /**
> > * Set core affinity of the current thread.
> > @@ -63,7 +63,8 @@ void rte_thread_get_affinity(rte_cpuset_t *cpusetp);
> > */
> >
> > __rte_experimental
> > -int rte_thread_tls_key_create(rte_tls_key *key, void
> > (*destructor)(void *));
> > +int rte_thread_tls_key_create(rte_thread_key *key,
> > + void (*destructor)(void *));
> >
>
> Also get rid of the redundant name in the functions:
>
> rte_thread_tls_xyz() -> rte_thread_xyz()
Right, will modify in v3, thanks.
More information about the dev
mailing list