On Mon, 18 May 2020 17:26:34 +0300
Tasnim Bashar <tbashar@mellanox.com> wrote:
> Add rte_sys_gettid function to use rte_gettid() on Windows.
> rte_gettid() is required for recursive spin lock and recursive ticket
> lock.
>
> Signed-off-by: Tasnim Bashar <tbashar@mellanox.com>
> ---
> lib/librte_eal/windows/eal_thread.c | 6 ++++++
> 1 file changed, 6 insertions(+)
>
> diff --git a/lib/librte_eal/windows/eal_thread.c
> b/lib/librte_eal/windows/eal_thread.c index e149199a6f..18f03c4280
> 100644 --- a/lib/librte_eal/windows/eal_thread.c
> +++ b/lib/librte_eal/windows/eal_thread.c
> @@ -157,6 +157,12 @@ eal_thread_create(pthread_t *thread)
> return 0;
> }
>
> +/* get current thread ID */
> +int rte_sys_gettid(void)
Please follow the style guide and place return type on a separate line.
You can use ./devtools/checkpatches.sh to catch similar mistakes.
> +{
> + return (int)eal_thread_self();
Maybe get rid of eal_thread_self() in this file and replace its call
with rte_sys_gettid()?
> +}
> +
> int
> rte_thread_setname(__rte_unused pthread_t id, __rte_unused const
> char *name) {
--
Dmitry Kozlyuk