Author: Armin Rigo <[email protected]>
Branch: stmgc-c7
Changeset: r70188:b06faf7b2607
Date: 2014-03-23 09:29 +0100
http://bitbucket.org/pypy/pypy/changeset/b06faf7b2607/

Log:    Fix (see existing test)

diff --git a/rpython/rlib/atomic_ops.py b/rpython/rlib/atomic_ops.py
--- a/rpython/rlib/atomic_ops.py
+++ b/rpython/rlib/atomic_ops.py
@@ -2,20 +2,14 @@
 from rpython.rtyper.lltypesystem import lltype, llmemory, rffi
 from rpython.translator.tool.cbuild import ExternalCompilationInfo
 
-
-cdir = py.path.local(__file__).join('..', '..', 'translator', 'stm')
-cdir2 = py.path.local(__file__).join('..', '..', 'translator', 'c')
-
 eci = ExternalCompilationInfo(
-    include_dirs = [cdir, cdir2],
     post_include_bits = ['''
-#include "src_stm/atomic_ops.h"
 #define pypy_bool_cas(ptr, old, _new)                \\
-           bool_cas((volatile unsigned long*)(ptr),  \\
+    __sync_bool_compare_and_swap((volatile unsigned long*)(ptr),  \\
                     (unsigned long)(old),            \\
                     (unsigned long)(_new))
 #define pypy_fetch_and_add(ptr, value)                    \\
-           fetch_and_add((volatile unsigned long*)(ptr),  \\
+    __sync_fetch_and_add((volatile unsigned long*)(ptr),  \\
                          (unsigned long)(value))
 '''],
 )
_______________________________________________
pypy-commit mailing list
[email protected]
https://mail.python.org/mailman/listinfo/pypy-commit

Reply via email to