summaryrefslogtreecommitdiffstats
path: root/Include/pyatomic.h
Commit message (Collapse)AuthorAgeFilesLines
* bpo-31462: Remove trailing whitespaces. (#3564)Serhiy Storchaka2017-09-141-9/+9
|
* bpo-30389 Adds detection of VS 2017 to distutils._msvccompiler (#1632)Steve Dower2017-09-071-8/+8
|
* bpo-9566 & bpo-30747: Silence warnings from pyatomic.h macros (#3140)Segev Finer2017-08-201-4/+4
| | | | | | | | | | | | | * bpo-9566: Silence warnings from pyatomic.h macros Apparently MSVC is too stupid to understand that the alternate branch is not taken and emits a warning for it. Warnings added in https://github.com/python/cpython/pull/2383 * bpo-9566: A better fix for the pyatomic.h warning * bpo-9566: Remove a slash
* bpo-30747: Attempt to fix atomic load/store (#2383)Pär Björklund2017-08-121-10/+295
| | | | | _Py_atomic_* are currently not implemented as atomic operations when building with MSVC. This patch attempts to implement parts of the functionality required.
* replace Py_(u)intptr_t with the c99 standard typesBenjamin Peterson2016-09-061-2/+2
|
* Use Py_uintptr_t for atomic pointersVictor Stinner2016-01-221-3/+3
| | | | | | | | Issue #26161: Use Py_uintptr_t instead of void* for atomic pointers in pyatomic.h. Use atomic_uintptr_t when <stdatomic.h> is used. Using void* causes compilation warnings depending on which implementation of atomic types is used.
* Issue #25150: Hide the private _Py_atomic_xxx symbols from the publicVictor Stinner2015-09-181-4/+2
| | | | | | | | | Python.h header to fix a compilation error with OpenMP. PyThreadState_GET() becomes an alias to PyThreadState_Get() to avoid ABI incompatibilies. It is important that the _PyThreadState_Current variable is always accessed with the same implementation of pyatomic.h. Use the PyThreadState_Get() function so extension modules will all reuse the same implementation.
* Issue #23644: Fix issues with C++ when compiling Python extensionsVictor Stinner2015-03-171-9/+3
| | | | | | | | Disable completly pyatomic.h on C++, because <stdatomic.h> is not compatible with C++. <pyatomic.h> is only needed by the optimized PyThreadState_GET() macro in pystate.h. Instead, declare PyThreadState_GET() as an alias to PyThreadState_Get(), as done for limited API.
* Issue #23644, #22038: Move #include <stdatomic.c> inside the extern "C" { ... }Victor Stinner2015-03-121-4/+4
| | | | block in pyatomic.h
* Issue #22038: pyatomic.h now uses stdatomic.h or GCC built-in functions forVictor Stinner2015-01-091-3/+77
| | | | | atomic memory access if available. Patch written by Vitor de Lima and Gustavo Temple.
* - Issue #11147: Fix an unused argument in _Py_ANNOTATE_MEMORY_ORDER. (FixBarry Warsaw2011-12-051-0/+1
| | | | given by Campbell Barton).
* Issue #13338: Handle all enumerations in _Py_ANNOTATE_MEMORY_ORDERPetri Lehtinen2011-11-191-2/+4
| | | | | This allows compiling extension modules with -Wswitch-enum on gcc. Initial patch by Floris Bruynooghe.
* Merge branches/pep-0384.Martin v. Löwis2010-12-031-0/+2
|
* Make (most of) Python's tests pass under Thread Sanitizer.Jeffrey Yasskin2010-05-031-0/+179
http://code.google.com/p/data-race-test/wiki/ThreadSanitizer is a dynamic data race detector that runs on top of valgrind. With this patch, the binaries at http://code.google.com/p/data-race-test/wiki/ThreadSanitizer#Binaries pass many but not all of the Python tests. All of regrtest still passes outside of tsan. I've implemented part of the C1x atomic types so that we can explicitly mark variables that are used across threads, and get defined behavior as compilers advance. I've added tsan's client header and implementation to the codebase in dynamic_annotations.{h,c} (docs at http://code.google.com/p/data-race-test/wiki/DynamicAnnotations). Unfortunately, I haven't been able to get helgrind and drd to give sensible error messages, even when I use their client annotations, so I'm not supporting them.