public inbox for linux-ia64@vger.kernel.org
 help / color / mirror / Atom feed
* ia64_cmpxchg on United Linux 1.0
@ 2003-09-30 22:38 Umut Aymakoglu
  2003-09-30 23:35 ` Boehm, Hans
  2003-10-01 22:12 ` Jim Wilson
  0 siblings, 2 replies; 3+ messages in thread
From: Umut Aymakoglu @ 2003-09-30 22:38 UTC (permalink / raw)
  To: linux-ia64





Hi -
   The macro used for test_and_set (ia64_cmpxchg) asm/atomic.h or
asm/spinlock.h on United Linux 1.0 is under #ifdef _KERNEL_  and therefore
can not be used in  user applications.  In RHAT 2.1 it was not under #ifdef
_KERNEL_ . Is there another macro for test_and_set  that user applications
can use?

thanks,
Umut


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

* RE: ia64_cmpxchg on United Linux 1.0
  2003-09-30 22:38 ia64_cmpxchg on United Linux 1.0 Umut Aymakoglu
@ 2003-09-30 23:35 ` Boehm, Hans
  2003-10-01 22:12 ` Jim Wilson
  1 sibling, 0 replies; 3+ messages in thread
From: Boehm, Hans @ 2003-09-30 23:35 UTC (permalink / raw)
  To: linux-ia64

You might want to look at the atomic operations package that's included
here: http://www.hpl.hp.com/research/linux/qprof/download.php4 .

This isn't exactly a mature package, but I'm trying to get it there.
IA64 is relatively well-supported.  And AFAIK, it's the only such package
that handles memory barriers explicitly and correctly (at least by
my definition of "correctly" :-) ).

Suggestions/bug reports/patches are welcome.

Hans

> -----Original Message-----
> From: Umut Aymakoglu [mailto:umuta@us.ibm.com]
> Sent: Tuesday, September 30, 2003 3:39 PM
> To: linux-ia64@vger.kernel.org
> Subject: ia64_cmpxchg on United Linux 1.0
> 
> 
> 
> 
> 
> 
> Hi -
>    The macro used for test_and_set (ia64_cmpxchg) asm/atomic.h or
> asm/spinlock.h on United Linux 1.0 is under #ifdef _KERNEL_  
> and therefore
> can not be used in  user applications.  In RHAT 2.1 it was 
> not under #ifdef
> _KERNEL_ . Is there another macro for test_and_set  that user 
> applications
> can use?
> 
> thanks,
> Umut
> 
> -
> To unsubscribe from this list: send the line "unsubscribe 
> linux-ia64" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html
> 

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

* Re: ia64_cmpxchg on United Linux 1.0
  2003-09-30 22:38 ia64_cmpxchg on United Linux 1.0 Umut Aymakoglu
  2003-09-30 23:35 ` Boehm, Hans
@ 2003-10-01 22:12 ` Jim Wilson
  1 sibling, 0 replies; 3+ messages in thread
From: Jim Wilson @ 2003-10-01 22:12 UTC (permalink / raw)
  To: linux-ia64

On Tue, 2003-09-30 at 15:38, Umut Aymakoglu wrote:
>  Is there another macro for test_and_set  that user applications
> can use?

The psABI defines a set of synchronization primitives in section 7.3. 
The psABI is available from the Intel IPF web site.
	http://developer.intel.com/design/itanium/arch_spec.htm

Gcc implements these primitives in the ia64intrin.h file.  This header
file should be available with any system that has gcc installed on it. 
It is found in the gcc install directory, probably under /usr/lib.

These are very basic primitives that expand to single IPF instructions. 
They won't be very useful unless you know what you are doing.  You might
be better off using libraries implemented on top of these primitives.

These primitives aren't used much.  HJ found a couple of simple type
errors in them when he looked at them earlier this year.  The patches
for these problems will be in gcc-3.4 which hasn't been released yet. 
They should be trivial to backpatch into older gcc releases if you need
them.
-- 
Jim Wilson, GNU Tools Support, http://www.SpecifixInc.com


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

end of thread, other threads:[~2003-10-01 22:12 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2003-09-30 22:38 ia64_cmpxchg on United Linux 1.0 Umut Aymakoglu
2003-09-30 23:35 ` Boehm, Hans
2003-10-01 22:12 ` Jim Wilson

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