From: Rusty Russell <rusty@rustcorp.com.au>
To: Ramkumar Ramachandra <artagnon@gmail.com>,
LKML <linux-kernel@vger.kernel.org>
Cc: "Michael S. Tsirkin" <mst@redhat.com>
Subject: Re: [PATCH] virtio tools: use ansi versions of asm and volatile
Date: Wed, 16 Oct 2013 10:39:09 +1030 [thread overview]
Message-ID: <87haci9ivu.fsf@rustcorp.com.au> (raw)
In-Reply-To: <1381833790-18687-1-git-send-email-artagnon@gmail.com>
Ramkumar Ramachandra <artagnon@gmail.com> writes:
> asm and volatile are provided for backward compatibility; use the ansi
> versions __asm__ and __volatile__.
Really? I don't see that in the gcc documentation. In fact, I didn't
know __volatile__ at all:
If you are writing a header file that should be includable in ISO C
programs, write `__asm__' instead of `asm'. *Note Alternate Keywords::.
We're not...
Cheers,
Rusty.
> Cc: Rusty Russell <rusty@rustcorp.com.au>
> Cc: Michael S. Tsirkin <mst@redhat.com>
> Signed-off-by: Ramkumar Ramachandra <artagnon@gmail.com>
> ---
> tools/virtio/asm/barrier.h | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/tools/virtio/asm/barrier.h b/tools/virtio/asm/barrier.h
> index aff61e1..b2fbbfc 100644
> --- a/tools/virtio/asm/barrier.h
> +++ b/tools/virtio/asm/barrier.h
> @@ -1,5 +1,5 @@
> #if defined(__i386__) || defined(__x86_64__)
> -#define barrier() asm volatile("" ::: "memory")
> +#define barrier() __asm__ __volatile__("" ::: "memory")
> #define mb() __sync_synchronize()
>
> #define smp_mb() mb()
> --
> 1.8.4.477.g5d89aa9
next prev parent reply other threads:[~2013-10-16 22:46 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-10-15 10:43 [PATCH] virtio tools: use ansi versions of asm and volatile Ramkumar Ramachandra
2013-10-16 0:09 ` Rusty Russell [this message]
2013-10-17 6:24 ` Ramkumar Ramachandra
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=87haci9ivu.fsf@rustcorp.com.au \
--to=rusty@rustcorp.com.au \
--cc=artagnon@gmail.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mst@redhat.com \
/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.