This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author vstinner
Recipients, jyasskin, neologix, vstinner
Date 2014-07-23.13:56:06
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <>
+ #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:

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.
Date User Action Args
2014-07-23 13:56:07vstinnersetrecipients: + vstinner, jyasskin, neologix,
2014-07-23 13:56:07vstinnersetmessageid: <>
2014-07-23 13:56:07vstinnerlinkissue22038 messages
2014-07-23 13:56:06vstinnercreate