From: Timur Tabi <ttabi@interactivesi.com>
To: "Linux-Kernel (E-mail)" <linux-kernel@vger.kernel.org>
Subject: Re: gnu asm help...
Date: Mon, 18 Jun 2001 18:20:52 -0500 [thread overview]
Message-ID: <z0dk5C.A.DoE.WzoL7@dinero.interactivesi.com> (raw)
In-Reply-To: <9319DDF797C4D211AC4700A0C96B7C9404AC2068@orsmsx42.jf.intel.com>
** Reply to message from "Raj, Ashok" <ashok.raj@intel.com> on Mon, 18 Jun 2001
15:56:50 -0700
> also if there is any reference to the gnu asm symtax, please send me a
> pointer..
There's lots
> i can understand what the LOCK "incl %0 means.. but not sure what the rest
> is for.
LOCK just means the x86 "lock" prefix.
incl is the 32-bit version of "inc" (incremement)
You want to return the variable? Try this:
static __inline__ unsigned long atomic_inc(atomic_t *v)
{
__asm__ __volatile__(
LOCK "incl %0"
:"=m" (v->counter)
:"m" (v->counter));
return v->counter;
}
--
Timur Tabi - ttabi@interactivesi.com
Interactive Silicon - http://www.interactivesi.com
next prev parent reply other threads:[~2001-06-18 23:21 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2001-06-18 22:56 gnu asm help Raj, Ashok
2001-06-18 23:18 ` Erik Mouw
2001-06-19 6:25 ` Bohdan Vlasyuk
2001-06-18 23:20 ` Timur Tabi [this message]
2001-06-19 7:44 ` Alan Cox
-- strict thread matches above, loose matches on Subject: below --
2001-06-19 1:36 Petr Vandrovec
2001-06-19 15:48 ` Timur Tabi
2001-06-19 17:21 ` Richard B. Johnson
2001-06-19 3:06 Rick Hohensee
2001-06-19 20:02 Petr Vandrovec
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=z0dk5C.A.DoE.WzoL7@dinero.interactivesi.com \
--to=ttabi@interactivesi.com \
--cc=linux-kernel@vger.kernel.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox