On Mar 21, 2013, at 1:54 PM, [email protected] wrote:

> Updated Branches:
>  refs/heads/master 1a2ebccb1 -> f41323e01
> 
> 
> Fix bug with 128 bit compare and swap.

Hmm, this doesn't build with clang ... it makes clang generate a call to a 
___sync_fetch_and_add_1 stub that doesn't exist:

Undefined symbols for architecture x86_64:
  "___sync_fetch_and_add_1", referenced from:
      _ink_freelist_new in ink_queue.o
      _ink_freelist_free in ink_queue.o
      _ink_atomiclist_pop in ink_queue.o
      _ink_atomiclist_popall in ink_queue.o
      _ink_atomiclist_push in ink_queue.o
      _ink_atomiclist_remove in ink_queue.o

I have an email out to the clang devs, but no response yet.

> 
> 
> Project: http://git-wip-us.apache.org/repos/asf/trafficserver/repo
> Commit: http://git-wip-us.apache.org/repos/asf/trafficserver/commit/4a090831
> Tree: http://git-wip-us.apache.org/repos/asf/trafficserver/tree/4a090831
> Diff: http://git-wip-us.apache.org/repos/asf/trafficserver/diff/4a090831
> 
> Branch: refs/heads/master
> Commit: 4a0908314acb301f1e9eb691bbcd8d956e86c321
> Parents: 57ffdf5
> Author: [email protected] <[email protected]>
> Authored: Thu Mar 21 10:10:16 2013 -0700
> Committer: John Plevyak <[email protected]>
> Committed: Thu Mar 21 10:10:16 2013 -0700
> 
> ----------------------------------------------------------------------
> lib/ts/ink_queue.h |    2 +-
> 1 files changed, 1 insertions(+), 1 deletions(-)
> ----------------------------------------------------------------------
> 
> 
> http://git-wip-us.apache.org/repos/asf/trafficserver/blob/4a090831/lib/ts/ink_queue.h
> ----------------------------------------------------------------------
> diff --git a/lib/ts/ink_queue.h b/lib/ts/ink_queue.h
> index 6ac9945..20fbf9a 100644
> --- a/lib/ts/ink_queue.h
> +++ b/lib/ts/ink_queue.h
> @@ -72,7 +72,7 @@ extern "C"
> #endif
> 
> #if TS_HAS_128BIT_CAS
> -#define INK_QUEUE_LD(dst,src) *((__int128_t*)&(dst)) = *((__int128_t*)&(src))
> +#define INK_QUEUE_LD(dst,src) *(__int128_t*)&(dst) = 
> __sync_fetch_and_add((__int128_t*)&(src), 0)
> #else
> #define INK_QUEUE_LD(dst,src) INK_QUEUE_LD64(dst,src)
> #endif
> 

Reply via email to