[PATCH v3 2/4] eal: add basic thread ID and current thread identifier API
David Marchand
david.marchand at redhat.com
Mon Apr 25 10:26:42 CEST 2022
On Wed, Apr 13, 2022 at 9:43 AM Tyler Retzlaff
<roretzla at linux.microsoft.com> wrote:
>
> Provide a portable type-safe thread identifier.
> Provide rte_thread_self for obtaining current thread identifier.
>
> Signed-off-by: Narcisa Vasile <navasile at microsoft.com>
> Signed-off-by: Tyler Retzlaff <roretzla at linux.microsoft.com>
> ---
> lib/eal/include/rte_thread.h | 22 ++++++++++++++++++++++
> lib/eal/unix/rte_thread.c | 11 +++++++++++
> lib/eal/version.map | 3 +++
> lib/eal/windows/rte_thread.c | 10 ++++++++++
> 4 files changed, 46 insertions(+)
>
> diff --git a/lib/eal/include/rte_thread.h b/lib/eal/include/rte_thread.h
> index 8be8ed8..fb66d9a 100644
> --- a/lib/eal/include/rte_thread.h
> +++ b/lib/eal/include/rte_thread.h
> @@ -1,7 +1,10 @@
> /* SPDX-License-Identifier: BSD-3-Clause
> * Copyright(c) 2021 Mellanox Technologies, Ltd
> + * Copyright (C) 2022 Microsoft Corporation
> */
>
> +#include <stdint.h>
> +
> #include <rte_os.h>
> #include <rte_compat.h>
>
> @@ -21,10 +24,29 @@
> #endif
>
> /**
> + * Thread id descriptor.
> + */
> +typedef struct rte_thread_tag {
Is there a need for rte_thread_tag.
I don't see it used.
--
David Marchand
More information about the dev
mailing list