All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Michael S. Tsirkin" <mst@redhat.com>
To: Thiago Farina <tfransosi@gmail.com>
Cc: virtualization@lists.linux-foundation.org, kvm@vger.kernel.org,
	rusty@rustcorp.com.au, linux-kernel@vger.kernel.org
Subject: Re: [PATCH 2/2] tools/virtio: virtio_test tool
Date: Mon, 13 Dec 2010 18:58:28 +0200	[thread overview]
Message-ID: <20101213165828.GA7182@redhat.com> (raw)
In-Reply-To: <AANLkTinSia0yt3xmNusXezVsmembv9NKoymN+rrBn_pY@mail.gmail.com>

On Mon, Dec 06, 2010 at 02:37:05PM -0200, Thiago Farina wrote:
> On Mon, Nov 29, 2010 at 3:16 PM, Michael S. Tsirkin <mst@redhat.com> wrote:
> > +#define container_of(ptr, type, member) ({                     \
> > +       const typeof( ((type *)0)->member ) *__mptr = (ptr);    \
> > +       (type *)( (char *)__mptr - offsetof(type,member) );})
> > +
> > +#define uninitialized_var(x) x = x
> > +
> > +# ifndef likely
> > +#  define likely(x)    (__builtin_expect(!!(x), 1))
> > +# endif
> > +# ifndef unlikely
> > +#  define unlikely(x)  (__builtin_expect(!!(x), 0))
> > +# endif
> 
> It seems you are not using these macros. Do you really need them here?

They are used by virtio that I'm compiling in userspace here.

> Can't you include the right linux header files for these macros
> instead?

Far from trivial as linux headers aren't intended to
be built in userspace, if you try you get all kind of
conflicts with libc headers etc.

If you see a way to do this, pls send me a patch.

-- 
MST

  parent reply	other threads:[~2010-12-13 16:59 UTC|newest]

Thread overview: 31+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-11-29 17:04 [PATCH 0/2] tools/virtio: virtio_ring testing tool Michael S. Tsirkin
2010-11-29 17:09 ` [PATCH 1/2] vhost test module Michael S. Tsirkin
2010-11-29 17:09 ` Michael S. Tsirkin
2010-12-02 19:00   ` Paul E. McKenney
2010-12-02 19:00   ` Paul E. McKenney
2010-12-02 19:11     ` Michael S. Tsirkin
2010-12-02 19:26       ` Paul E. McKenney
2010-12-02 19:26       ` Paul E. McKenney
2010-12-02 19:47         ` Michael S. Tsirkin
2010-12-02 19:47         ` Michael S. Tsirkin
2010-12-02 23:13           ` Paul E. McKenney
2010-12-02 23:13           ` Paul E. McKenney
2010-12-02 23:18             ` Michael S. Tsirkin
2010-12-02 23:56               ` Paul E. McKenney
2010-12-02 23:56               ` Paul E. McKenney
2010-12-04 18:03                 ` Paul E. McKenney
2010-12-04 18:03                 ` Paul E. McKenney
2010-12-02 23:18             ` Michael S. Tsirkin
2010-12-02 19:11     ` Michael S. Tsirkin
2010-11-29 17:16 ` [PATCH 2/2] tools/virtio: virtio_test tool Michael S. Tsirkin
2010-11-29 17:16 ` Michael S. Tsirkin
2010-12-06  4:53   ` Rusty Russell
2010-12-06  4:53   ` Rusty Russell
2010-12-13 17:14     ` Michael S. Tsirkin
2010-12-13 17:14       ` Michael S. Tsirkin
2010-12-06 16:37   ` Thiago Farina
2010-12-06 16:37   ` Thiago Farina
2010-12-13 16:58     ` Michael S. Tsirkin
2010-12-13 16:58     ` Michael S. Tsirkin [this message]
2011-09-07  3:34   ` Zhi Yong Wu
2011-09-07  3:34   ` Zhi Yong Wu

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=20101213165828.GA7182@redhat.com \
    --to=mst@redhat.com \
    --cc=kvm@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=rusty@rustcorp.com.au \
    --cc=tfransosi@gmail.com \
    --cc=virtualization@lists.linux-foundation.org \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.