Andy H wrote:
http://gcc.gnu.org/onlinedocs/gcc-4.1.0/gcc/Atomic-Builtins.html


To quote from the first paragraph of that manual page:

The following builtins are intended to be compatible with those described in the Intel Itanium Processor-specific Application Binary Interface, section 7.4. As such, they depart from the normal GCC practice of using the “__builtin_” prefix, and further that they are overloaded such that they work on multiple types.


I've never used these functions, so I may be skating on thin ice here - you'll no doubt correct me if I'm wrong!

These "atomic access" builtins are very much specific to the Itanium - they are basically wrappers around some assembly primitives, for use in operating system fundamentals such as locks and synchronisation primitives. For other targets, people normally just use a couple of lines of inline assembly - for the Itanium, assembly language is so hideous that it's worth having these builtin wrappers.


While I think it is worth having a set of consistent atomic access builtins that work across gcc ports, I'm not sure the Itanium's functions are the best model.

mvh.,

David



_______________________________________________
AVR-GCC-list mailing list
[email protected]
http://lists.nongnu.org/mailman/listinfo/avr-gcc-list

Reply via email to