This is the mail archive of the gcc-help@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: can __exchange_and_add be used from outside?


Juan Carlos Franzoy <jfranzoy@yahoo.com.ar> writes:

> Hello. I write because I was wondering if __exchange_and_add can be used from user code or it's an internal detail of libstdc++.
> 
> I have to implement a library with AtomicSet and AtomicAdd. The library must be portable across solaris/sparc, linux/x86 and hpux11/parisc.
> 
> If the answer is no, do anybody know how to do it?

gcc provides these calls as extensions:
    http://gcc.gnu.org/onlinedocs/gcc-4.1.2/gcc/Atomic-Builtins.html

Ian


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]