DPDK patches and discussions
 help / color / mirror / Atom feed
From: Tasnim Bashar <tbashar@mellanox.com>
To: Thomas Monjalon <thomas@monjalon.net>
Cc: "dev@dpdk.org" <dev@dpdk.org>,
	"harini.ramakrishnan@microsoft.com"
	<harini.ramakrishnan@microsoft.com>,
	"pallavi.kadam@intel.com" <pallavi.kadam@intel.com>,
	"ranjit.menon@intel.com" <ranjit.menon@intel.com>,
	 "ocardona@microsoft.com" <ocardona@microsoft.com>,
	"navasile@linux.microsoft.com" <navasile@linux.microsoft.com>,
	"dmitry.kozliuk@gmail.com" <dmitry.kozliuk@gmail.com>,
	Tal Shnaiderman <talshn@mellanox.com>,
	Fady Bader <fady@mellanox.com>, Ophir Munk <ophirmu@mellanox.com>
Subject: Re: [dpdk-dev] [PATCH v3] eal/windows: fix invalid thread handle
Date: Tue, 16 Jun 2020 19:00:01 +0000	[thread overview]
Message-ID: <VI1PR05MB61287717C9E9C3207A93669BDA9D0@VI1PR05MB6128.eurprd05.prod.outlook.com> (raw)
In-Reply-To: <13269652.10yzYP2DCA@thomas>

> From: Thomas Monjalon <thomas@monjalon.net>
> 02/06/2020 04:00, Tasnim Bashar:
> >  #define pthread_setaffinity_np(thread, size, cpuset) \
> > -	eal_set_thread_affinity_mask(thread, (unsigned long *) cpuset)
> > +	eal_set_thread_affinity_mask(thread, cpuset)
> >  #define pthread_getaffinity_np(thread, size, cpuset) \
> > -	eal_get_thread_affinity_mask(thread, (unsigned long *) cpuset)
> > +	eal_get_thread_affinity_mask(thread, cpuset)
> >  #define pthread_create(threadid, threadattr, threadfunc, args) \
> >  	eal_create_thread(threadid, threadfunc, args)
> >
> >  static inline int
> > -eal_set_thread_affinity_mask(pthread_t threadid, unsigned long *cpuset)
> > +eal_set_thread_affinity_mask(pthread_t threadid, rte_cpuset_t *cpuset)
> [...]
> >  static inline int
> > -eal_get_thread_affinity_mask(pthread_t threadid, unsigned long *cpuset)
> > +eal_get_thread_affinity_mask(pthread_t threadid, rte_cpuset_t *cpuset)
> 
> I don't understand the need for the #define.
> Why not naming the functions with the final pthread standard name?

Some functions take more inputs and some take less, that's why we used #define.
But it is possible to implement them without #define, naming the functions with the final pthread standard name.
However, it will be better to change it in a different commit.

  reply	other threads:[~2020-06-16 19:00 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-05-22  0:11 [dpdk-dev] [PATCH] " Tasnim Bashar
2020-05-22  0:55 ` Dmitry Kozlyuk
2020-06-02  2:00 ` [dpdk-dev] [PATCH v3] " Tasnim Bashar
2020-06-11 14:35   ` Thomas Monjalon
2020-06-12 16:22     ` Tasnim Bashar
2020-06-12 21:33       ` Thomas Monjalon
2020-06-15  8:16   ` Thomas Monjalon
2020-06-16 18:53     ` Tasnim Bashar
2020-06-16 19:17       ` Thomas Monjalon
2020-06-16 19:59         ` Tasnim Bashar
2020-06-15  9:42   ` Thomas Monjalon
2020-06-16 19:00     ` Tasnim Bashar [this message]
2020-06-24 23:10   ` [dpdk-dev] [PATCH v4] eal/windows: fix " Tasnim Bashar
2020-06-25  0:38     ` Ranjit Menon
2020-06-25 19:11       ` Tasnim Bashar
2020-06-25 19:25     ` [dpdk-dev] [PATCH v5] " Tasnim Bashar
2020-06-29 23:09       ` Thomas Monjalon

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=VI1PR05MB61287717C9E9C3207A93669BDA9D0@VI1PR05MB6128.eurprd05.prod.outlook.com \
    --to=tbashar@mellanox.com \
    --cc=dev@dpdk.org \
    --cc=dmitry.kozliuk@gmail.com \
    --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=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).