Author: Armin Rigo <[email protected]>
Branch: 
Changeset: r2847:80a8b3ce3902
Date: 2017-01-02 20:53 +0100
http://bitbucket.org/cffi/cffi/changeset/80a8b3ce3902/

Log:    support more obscure compilers. source is
        https://github.com/matricks/bam/pull/61/files

diff --git a/c/call_python.c b/c/call_python.c
--- a/c/call_python.c
+++ b/c/call_python.c
@@ -177,7 +177,20 @@
 #if (defined(WITH_THREAD) && !defined(_MSC_VER) &&   \
      !defined(__amd64__) && !defined(__x86_64__) &&   \
      !defined(__i386__) && !defined(__i386))
-# define read_barrier()  __sync_synchronize()
+# if defined(__GNUC__)
+#   define read_barrier()  __sync_synchronize()
+# elif defined(_AIX)
+#   define read_barrier()  __lwsync()
+# elif defined(__SUNPRO_C) || defined(__SUNPRO_CC)
+#   include <mbarrier.h>
+#   define read_barrier()  __compiler_barrier()
+# elif defined(__hpux)
+#   define read_barrier()  _Asm_mf()
+# else
+#   define read_barrier()  /* missing */
+#   warning "no definition for read_barrier(), missing synchronization for\
+ multi-thread initialization in embedded mode"
+# endif
 #else
 # define read_barrier()  (void)0
 #endif
_______________________________________________
pypy-commit mailing list
[email protected]
https://mail.python.org/mailman/listinfo/pypy-commit

Reply via email to