Hi, I don't know if this is a compiler question or a platform question but it is definitely a programming question.
On the new M$ 64-bit platform released this week, they support ATOMIC operations on 64-bit values.
Were do I find the equivalent ATOMIC functions on LINUX?
In asm-x86_64/atomic.h I can only find operations that work on 32-bit values.
Do I basically have to roll my own versions of these functions?
Is this something someone is looking to add to atomic.h for various platforms?
Thanks in Advance,
Dennis
On Thursday 28 April 2005 6:34 pm, Calkins, Dennis wrote:
Hi, I don't know if this is a compiler question or a platform question but it is definitely a programming question.
On the new M$ 64-bit platform released this week, they support ATOMIC operations on 64-bit values.
Were do I find the equivalent ATOMIC functions on LINUX?
In asm-x86_64/atomic.h I can only find operations that work on 32-bit values.
Do I basically have to roll my own versions of these functions?
Is this something someone is looking to add to atomic.h for various platforms?
I have an Itanium system, and in atomic.h there are several functions that utilize longs (eg. 64 bit ). static __inline__ int ia64_atomic64_add (__s64 i, atomic64_t *v) { __s64 old, new; CMPXCHG_BUGCHECK_DECL
do { CMPXCHG_BUGCHECK(v); old = atomic_read(v); new = old + i; } while (ia64_cmpxchg(acq, v, old, new, sizeof(atomic_t)) != old); return new; }
However, while this returns an int eventhough the values are 64-bit. I'm going to email the author. (BTW: This is in SLES9).
On Thursday 28 April 2005 6:34 pm, Calkins, Dennis wrote:
Hi, I don't know if this is a compiler question or a platform question but it is definitely a programming question.
On the new M$ 64-bit platform released this week, they support ATOMIC operations on 64-bit values.
Were do I find the equivalent ATOMIC functions on LINUX?
In asm-x86_64/atomic.h I can only find operations that work on 32-bit values.
Do I basically have to roll my own versions of these functions?
Is this something someone is looking to add to atomic.h for various platforms?
I previously reported that on IA64there are several functions that utilize longs (eg. 64 bit ). static __inline__ int ia64_atomic64_add (__s64 i, atomic64_t *v) {
And these are incorrectly declared as returning int. I have since contacted the author of the header files, and have submitted a patch to correct it where I changed them to return: static __inline__ __s64
In your case, with the x64_64, you will probably need to roll your own.
programming@lists.opensuse.org