Author: mattip <[email protected]>
Branch:
Changeset: r72250:a2dd3da64cac
Date: 2014-06-27 08:40 +0300
http://bitbucket.org/pypy/pypy/changeset/a2dd3da64cac/
Log: attempt fixes for win32
diff --git a/rpython/translator/c/src/thread.h
b/rpython/translator/c/src/thread.h
--- a/rpython/translator/c/src/thread.h
+++ b/rpython/translator/c/src/thread.h
@@ -12,6 +12,7 @@
#ifdef _WIN32
#include "thread_nt.h"
+#define inline _inline
#else
/* We should check if unistd.h defines _POSIX_THREADS, but sometimes
diff --git a/rpython/translator/c/src/thread_nt.c
b/rpython/translator/c/src/thread_nt.c
--- a/rpython/translator/c/src/thread_nt.c
+++ b/rpython/translator/c/src/thread_nt.c
@@ -223,7 +223,12 @@
return (result != WAIT_TIMEOUT);
}
+#ifdef _M_IA64
+/* On Itanium, use 'acquire' memory ordering semantics */
#define lock_test_and_set(ptr, value) InterlockedExchangeAcquire(ptr, value)
+#else
+#define lock_test_and_set(ptr, value) InterlockedExchange(ptr, value)
+#endif
#define atomic_increment(ptr) InterlockedIncrement(ptr)
#define atomic_decrement(ptr) InterlockedDecrement(ptr)
_______________________________________________
pypy-commit mailing list
[email protected]
https://mail.python.org/mailman/listinfo/pypy-commit