Author vstinner
Recipients Vitor.de.Lima, jyasskin, neologix, vstinner
Date 2014-07-23.13:56:06
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1406123767.5.0.189609122726.issue22038@psf.upfronthosting.co.za>
In-reply-to
Content
+ #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.
History
Date User Action Args
2014-07-23 13:56:07vstinnersetrecipients: + vstinner, jyasskin, neologix, Vitor.de.Lima
2014-07-23 13:56:07vstinnersetmessageid: <1406123767.5.0.189609122726.issue22038@psf.upfronthosting.co.za>
2014-07-23 13:56:07vstinnerlinkissue22038 messages
2014-07-23 13:56:06vstinnercreate