[HarfBuzz] harfbuzz-ng: Branch 'master'

Behdad Esfahbod behdad at kemper.freedesktop.org
Tue Jun 26 08:16:22 PDT 2012


 configure.ac             |    9 +++++----
 src/hb-atomic-private.hh |    2 +-
 2 files changed, 6 insertions(+), 5 deletions(-)

New commits:
commit 12f5c0a222a2f0aebe63c0d367937a0ff985474a
Author: Behdad Esfahbod <behdad at behdad.org>
Date:   Tue Jun 26 11:16:13 2012 -0400

    Fix check for Intel atomic ops

diff --git a/configure.ac b/configure.ac
index 2eebc79..0e2bbf6 100644
--- a/configure.ac
+++ b/configure.ac
@@ -182,11 +182,12 @@ dnl ===========================================================================
 
 AC_CACHE_CHECK([for Intel atomic primitives], hb_cv_have_intel_atomic_primitives, [
 	hb_cv_have_intel_atomic_primitives=false
-	AC_TRY_LINK([], [
+	AC_TRY_LINK([
 		void memory_barrier (void) { __sync_synchronize (); }
-		int atomic_add (int i) { return __sync_fetch_and_add (&i, 1); }
-		int atomic_cmpxchg (int *i, int *j, int *k) { return __sync_bool_compare_and_swap (&i, j, k); }
-		], hb_cv_have_intel_atomic_primitives=true
+		int atomic_add (int *i) { return __sync_fetch_and_add (i, 1); }
+		int mutex_trylock (int *m) { return __sync_lock_test_and_set (m, 1); }
+		void mutex_unlock (int *m) { __sync_lock_release (m); }
+		], [], hb_cv_have_intel_atomic_primitives=true
 	)
 ])
 if $hb_cv_have_intel_atomic_primitives; then
diff --git a/src/hb-atomic-private.hh b/src/hb-atomic-private.hh
index c543a8d..918852d 100644
--- a/src/hb-atomic-private.hh
+++ b/src/hb-atomic-private.hh
@@ -65,7 +65,7 @@ typedef int32_t hb_atomic_int_t;
 #define hb_atomic_ptr_cmpexch(P,O,N)	OSAtomicCompareAndSwapPtrBarrier ((void *) (O), (void *) (N), (void **) (P))
 
 
-#elif !defined(HB_NO_MT) && defined(HAVE_INTEL_ATOMIC_PRIMITIVES) && !defined(__MINGW32__)
+#elif !defined(HB_NO_MT) && defined(HAVE_INTEL_ATOMIC_PRIMITIVES)
 
 typedef int hb_atomic_int_t;
 #define hb_atomic_int_add(AI, V)	__sync_fetch_and_add (&(AI), (V))



More information about the HarfBuzz mailing list