[ltt-dev] [PATCH 00/12] provide default definition of uatomic builtins

Paolo Bonzini pbonzini at redhat.com
Mon Feb 15 14:04:33 EST 2010


So here we go with v2.  Changes are:

- tests/api.h also symlinked

- uatomic_gcc.h renamed to uatomic_defaults.h as even architectures
  that don't want __sync_* builtins use it

- improved comments about mc/rmc/wmc in urcu/arch_defaults.h

- changed BITS_PER_LONG patch since __SIZEOF_LONG__ was newer than I
  thought, placed this patch at the end so you can omit it easily
  if NACKed (requires GCC 3.4 on 64-bit systems, nothing on 32-bit)

- added back assembly code for PPC and S390 so that those platforms
  do not need __sync_* builtins (SPARC and x86 didn't already in v1)

- added implementation of uatomic_exchange using __sync_bool_compare_and_swap
  (same trick S390 is using in the assembly implementation)

- patch 11 is new

As in v1, the last patch is not to be committed.  In the next days/week,
I'll try to build it on more machines and using old GCCs, but I cannot
promise anything right now...

Paolo Bonzini (12):
  use kernel style makefile output
  use autoconf symbolic linking
  add urcu/arch_defaults.h
  define sync_core for x86 PIC
  remove compat_uatomic_cmpxchg #define from non-x86
  add uatomic_defaults.h, use it for default definitions
  use uatomic_defaults.h for common fallback implementations
  move whether atomic byte/short exists to uatomic_arch_*.h
  add Alpha support
  support compiling on unknown architectures
  avoid multiple evaluation of STORE_SHARED argument
  centralize definition of BITS_PER_LONG
  test uatomic_defaults.h

 Makefile.am                 |   15 +--
 configure.ac                |   24 +++-
 tests/Makefile.am           |   12 --
 tests/test_uatomic.c        |   13 +--
 urcu/arch_alpha.h           |   48 ++++++
 urcu/arch_defaults.h        |  132 ++++++++++++++++
 urcu/arch_ppc.h             |   54 +------
 urcu/arch_s390.h            |   50 +------
 urcu/arch_sparc64.h         |   55 +-------
 urcu/arch_x86.h             |   68 ++-------
 urcu/compiler.h             |    8 +
 urcu/system.h               |    4 +-
 urcu/uatomic_arch_alpha.h   |   32 ++++
 urcu/uatomic_arch_ppc.h     |   29 +----
 urcu/uatomic_arch_s390.h    |   71 +---------
 urcu/uatomic_arch_sparc64.h |  112 +-------------
 urcu/uatomic_arch_x86.h     |   41 ++----
 urcu/uatomic_defaults.h     |  354 +++++++++++++++++++++++++++++++++++++++++++
 18 files changed, 634 insertions(+), 488 deletions(-)





More information about the lttng-dev mailing list