Line 0
Link Here
|
|
|
1 |
--- src/hb-atomic-private.hh.orig 2015-04-10 02:16:57 UTC |
2 |
+++ src/hb-atomic-private.hh |
3 |
@@ -103,8 +103,12 @@ typedef int hb_atomic_int_impl_t; |
4 |
#define hb_atomic_int_impl_add(AI, V) __sync_fetch_and_add (&(AI), (V)) |
5 |
|
6 |
#define hb_atomic_ptr_impl_get(P) (void *) (__sync_synchronize (), *(P)) |
7 |
+#if defined(__FreeBSD__) && defined(__mips__) |
8 |
+#include <machine/atomic.h> |
9 |
+#define hb_atomic_ptr_impl_cmpexch(P,O,N) atomic_cmpset_rel_32 ((uint32_t *)(P), (uint32_t)(O), (uint32_t)(N)) |
10 |
+#else |
11 |
#define hb_atomic_ptr_impl_cmpexch(P,O,N) __sync_bool_compare_and_swap ((P), (O), (N)) |
12 |
- |
13 |
+#endif |
14 |
|
15 |
#elif !defined(HB_NO_MT) && defined(HAVE_SOLARIS_ATOMIC_OPS) |
16 |
|