STINNER Victor added the comment: + #define __ATOMIC_RELAXED 0
You should use the "_Py_" prefix for these constants, to avoid conflicts in applications. (You may also replace tabs with spaces, the PEP 7 says "Use 4-space indents and no tabs at all." but I also prefer to avoid tabs in other places.) I tested your patch on Fedora 20 (Linux kernel 3.14.8, GCC 4.8.2, glibc 2.18) on x86_64 ("Intel(R) Core(TM) i7-2600 CPU @ 3.40GHz") and the whole Python test suite pass. GCC 4.9 (released a few month ago) provides the <stdatomic.h> header: https://gcc.gnu.org/gcc-4.9/changes.html pyatomic.h contains this comment: /* XXX: When compilers start offering a stdatomic.h with lock-free atomic_int and atomic_address types, include that here and rewrite the atomic operations in terms of it. */ But using <stdatomic.h> header can be done in a separated issue. ---------- nosy: +haypo _______________________________________ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue22038> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com