1
Description: Use GCC's atomic builtins in the FPM SAPI to allow it to
4
Forwarded: http://bugs.php.net/52407
5
Last-Update: 2010-07-28
7
Index: php-5.3.3/sapi/fpm/fpm/fpm_atomic.h
8
===================================================================
9
--- php-5.3.3.orig/sapi/fpm/fpm/fpm_atomic.h
10
+++ php-5.3.3/sapi/fpm/fpm/fpm_atomic.h
15
-#if ( __i386__ || __i386 )
16
+#if (__GNUC__) && (__GNUC__ >= 4 && __GNUC_MINOR__ >= 1)
19
+ * all the cases below (as provided by upstream) define:
20
+ * word as atomic_int_t, and
21
+ * unsigned word as atomic_uint_t
22
+ * and only use volatile atomic_uint_t as atomic_t
25
+typedef volatile unsigned long atomic_t;
26
+#define atomic_cmp_set(a,b,c) __sync_bool_compare_and_swap(a,b,c)
28
+#elif ( __i386__ || __i386 )
30
typedef int32_t atomic_int_t;
31
typedef uint32_t atomic_uint_t;