
Peter Dimov wrote:
Joaquín Mª López Muñoz wrote:
I think that the functions
atomic_increment atomic_decrement atomic_conditional_increment
should be marked as inline, as they are defined in a header file. This is causing multiple definition problems, see for instance
Yes, you are right. I'd fix it but I don't know whether "inline" needs to go before or after "asm". ;-) Rene?
Sorry.. it took a while, waiting for the CVS update. And the answer is "neither". Function level assembly can't be inlined. At least that's what the compilers says :-) Which means changing to use statement level assembly. So it would have to be something like this... inline void atomic_increment( register long * pw ) { asm { loop: lwarx r4, 0, r3 addi r4, r4, 1 stwcx. r4, 0, r3 bne- loop } } Which when applied to the other functions, compiles without warnings. And since all the tests pass, I checked in the changes to CVS. -- -- Grafik - Don't Assume Anything -- Redshift Software, Inc. - http://redshift-software.com -- rrivera/acm.org - grafik/redshift-software.com -- 102708583/icq - grafikrobot/aim - Grafik/jabber.org