I see there is an asm/atomic.h on linux with atomic_add but that also
doesn't look like a cross platform solution. It also have basically the same
assembly code inside. Still it is probably a good idea to use that instead
of the assembly.
There is an atomic_add solution for solaris 10 as well but it is placed to a
I will look into adding this as ifdef but it wouldn't work for older solaris
Thanks for the pointers,
On Fri, May 20, 2011 at 19:01, Patrick Hunt <[EMAIL PROTECTED]> wrote:
> Hi Botond, looking at the history for those lines it looks like that
> code has been untouched since before we moved to Apache (2008).
> A quick search turned up this interesting backgrounder:
> (be sure to checkout the comments on that post)
> If you'd like to submit a patch to move away from asm I don't see why
> we wouldn't consider it. My concern would be that we replace it with
> something that we have a high confidence will work on all platforms,
> compilers, and compiler versions. Perhaps do it initially as a ifdef?
> On Fri, May 20, 2011 at 8:06 AM, Botond Hejj
> <[EMAIL PROTECTED]> wrote:
> > Hi,
> > I am compiling the zookeeper c client on solaris and I noticed that
> > mt_adaptor.c has some assembly code in it. This makes porting to other
> > platforms (sparc) difficult. What is the reason behind using assembly and
> > are there any plans to change that to c code?
> > Regards,
> > Botond Hejj
> > Morgan Stanley | Technology
> > Lechner Odon fasor 8 | Floor 07
> > Budapest, 1095
> > Phone: +36 1 881-3962
> > [EMAIL PROTECTED]
Morgan Stanley | Technology
Lechner Odon fasor 8 | Floor 07
Phone: +36 1 881-3962