public inbox for linux-ia64@vger.kernel.org
 help / color / mirror / Atom feed
* [Linux-ia64] atomic add instruction
@ 2001-07-17 22:09 Swaminathan Sivasubramanian
  2001-07-18 21:32 ` David Mosberger
  0 siblings, 1 reply; 2+ messages in thread
From: Swaminathan Sivasubramanian @ 2001-07-17 22:09 UTC (permalink / raw)
  To: linux-ia64

Hello Everyone,

I  want an atomic function that does addition of a constant to the value in
a memory location and returns the previous value in that location.

 Is there any macro/function defined in IA-64's atomic.h already. (will
fetch-and-add solve the purpose?) or one should write his own function for
it

Thanking in advance,
Swami




^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [Linux-ia64] atomic add instruction
  2001-07-17 22:09 [Linux-ia64] atomic add instruction Swaminathan Sivasubramanian
@ 2001-07-18 21:32 ` David Mosberger
  0 siblings, 0 replies; 2+ messages in thread
From: David Mosberger @ 2001-07-18 21:32 UTC (permalink / raw)
  To: linux-ia64

There are compiler intrinisics for this purpose.  See the IA-64
processor-specific ABI for a description.  You have to include
<ia64intrin.h> to get the intrinsics defined.

	--david

>>>>> On Tue, 17 Jul 2001 15:09:46 -0700, "Swaminathan Sivasubramanian" <ssivasu@us.ibm.com> said:

  Swami> Hello Everyone,

  Swami> I want an atomic function that does addition of a constant to
  Swami> the value in a memory location and returns the previous value
  Swami> in that location.

  Swami>  Is there any macro/function defined in IA-64's atomic.h
  Swami> already. (will fetch-and-add solve the purpose?) or one
  Swami> should write his own function for it

  Swami> Thanking in advance, Swami



  Swami> _______________________________________________ Linux-IA64
  Swami> mailing list Linux-IA64@linuxia64.org
  Swami> http://lists.linuxia64.org/lists/listinfo/linux-ia64


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2001-07-18 21:32 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2001-07-17 22:09 [Linux-ia64] atomic add instruction Swaminathan Sivasubramanian
2001-07-18 21:32 ` David Mosberger

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox