DPDK patches and discussions
 help / color / mirror / Atom feed
From: Dmitry Kozlyuk <dmitry.kozliuk@gmail.com>
To: Tasnim Bashar <tbashar@mellanox.com>
Cc: dev@dpdk.org, harini.ramakrishnan@microsoft.com,
	pallavi.kadam@intel.com, ranjit.menon@intel.com,
	ocardona@microsoft.com, navasile@linux.microsoft.com,
	talshn@mellanox.com, fady@mellanox.com, ophirmu@mellanox.com,
	thomas@monjalon.net
Subject: Re: [dpdk-dev] [PATCH] eal/windows: support thread ID query
Date: Mon, 18 May 2020 20:48:59 +0300	[thread overview]
Message-ID: <20200518204859.3d66a5f2@sovereign> (raw)
In-Reply-To: <20200518142634.17760-1-tbashar@mellanox.com>

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

      reply	other threads:[~2020-05-18 17:49 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-05-18 14:26 Tasnim Bashar
2020-05-18 17:48 ` Dmitry Kozlyuk [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20200518204859.3d66a5f2@sovereign \
    --to=dmitry.kozliuk@gmail.com \
    --cc=dev@dpdk.org \
    --cc=fady@mellanox.com \
    --cc=harini.ramakrishnan@microsoft.com \
    --cc=navasile@linux.microsoft.com \
    --cc=ocardona@microsoft.com \
    --cc=ophirmu@mellanox.com \
    --cc=pallavi.kadam@intel.com \
    --cc=ranjit.menon@intel.com \
    --cc=talshn@mellanox.com \
    --cc=tbashar@mellanox.com \
    --cc=thomas@monjalon.net \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).