Hi, Thank you for your patch. It may work, but I don't know whether all test pass or not.
In the upstream version, it use __atomic_fetch_add to solve issue instead. +# elif defined(__ATOMIC_SEQ_CST) /* GCC atomic builtins */ +# define GRN_ATOMIC_ADD_EX(p,i,r) \ + (r = __atomic_fetch_add(p, i, __ATOMIC_SEQ_CST)) Could you check above atomic operation on mips64el? On Thu, 26 Feb 2015 15:46:53 +0800 YunQiang Su <[email protected]> wrote: > May this patch work? It can build on mips64el now. > > --- groonga-4.0.6.1/lib/groonga_in.h 2014-10-15 20:07:16.627267021 +0800 > +++ xxxx/lib/groonga_in.h 2015-02-26 12:33:56.529800636 +0800 > @@ -487,6 +487,7 @@ > # define GRN_BIT_SCAN_REV(v,r) for (r = 31; r && !((1 << r) & v); r--) > # define GRN_BIT_SCAN_REV0(v,r) GRN_BIT_SCAN_REV(v,r) > # else /* ATOMIC ADD */ > +# define GRN_ATOMIC_ADD_EX(p,i,r) (r = __sync_fetch_and_add(p, i)) > /* todo */ > # define GRN_BIT_SCAN_REV(v,r) for (r = 31; r && !((1 << r) & v); r--) > # define GRN_BIT_SCAN_REV0(v,r) GRN_BIT_SCAN_REV(v,r) > -- HAYASHI Kentaro <[email protected]> -- To UNSUBSCRIBE, email to [email protected] with a subject of "unsubscribe". Trouble? Contact [email protected]

