On Apr 9, 2009, at 8:58 AM, Monty Taylor wrote:
Stewart Smith wrote:
On Thu, Apr 09, 2009 at 12:50:48AM +0200, Paul McCullagh wrote:
bzr branch lp:~drizzle-pbxt/drizzle/drizzle-pbxt
Getting link failures on linux/sparc (you have ssh to the box, so
feel
free to try there if you like):
../storage/pbxt/src/libpbxt.a(libpbxt_a-lock_xt.o): In function
`xt_atomic_dec2(unsigned short volatile*)':
/home/stewart/drizzle/drizzle-pbxt/storage/pbxt/src/lock_xt.h:209:
undefined reference to `__sync_fetch_and_sub_2'
../storage/pbxt/src/libpbxt.a(libpbxt_a-lock_xt.o): In function
`xt_atomic_inc2(unsigned short volatile*)':
/home/stewart/drizzle/drizzle-pbxt/storage/pbxt/src/lock_xt.h:194:
undefined reference to `__sync_fetch_and_add_2'
collect2: ld returned 1 exit status
IIRC mtaylor had similar he had to sort out with the GCC atomics
work.
Yes... there are some atomic issues. This:
#elif defined(__GNUC__)
__sync_fetch_and_add(mptr, 1);
is not valid, as that is not in existence everywhere (like sparc)
Does Spark Linux have something we can use, or is the only alternative
to use assembler?
You can probably find the right SPARC assembler for it pretty easily
though if that'd help.
on a slightly different note, for the default #else there, The ++
and --
operators I don't think are excellent choices... going instead for
#error or a lock would be better (and produce correct results).
In drizzled/atomic.h we fall back to pthread locks on platforms that
don't have TBB or gcc atomics or Sun atomics. You're welcome to use
drizzled/atomic.h in your code, of course... :)
Love too, but we have to solve the problem for MySQL as well :)
- Paul
--
Paul McCullagh
PrimeBase Technologies
www.primebase.org
www.blobstreaming.org
pbxt.blogspot.com
_______________________________________________
Mailing list: https://launchpad.net/~drizzle-discuss
Post to : [email protected]
Unsubscribe : https://launchpad.net/~drizzle-discuss
More help : https://help.launchpad.net/ListHelp