Commit Graph

12 Commits

Author SHA1 Message Date
Victor Stinner b02ef715a3 Use Py_uintptr_t for atomic pointers
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.
2016-01-22 14:09:55 +01:00
Serhiy Storchaka 009b811d67 Removed unintentional trailing spaces in non-external and non-generated C files. 2015-03-18 21:53:15 +02:00
Serhiy Storchaka 53fa8b2a4b Fixed few compiler warnings. 2015-02-16 09:40:12 +02:00
Kristján Valur Jónsson e75ff35af2 Issue #15038: Optimize python Locks on Windows
Extract cross-platform condition variable support into a separate file and
provide user-mode non-recursive locks for Windows.
2012-06-18 20:30:44 +00:00
Kristján Valur Jónsson 187aa54516 Signal condition variables with the mutex held. Destroy condition variables
before their mutexes.
2012-06-05 22:17:42 +00:00
Antoine Pitrou 6a002c02da Fix the GIL with subinterpreters. Hopefully this will allow mod_wsgi to work with 3.2.
(we need some tests for this)
2011-01-15 11:37:11 +00:00
Antoine Pitrou 1df1536fb9 Issue #9828: Destroy the GIL in Py_Finalize(), so that it gets properly
re-created on a subsequent call to Py_Initialize().  The problem (a crash)
wouldn't appear in 3.1 or 2.7 where the GIL's structure is more trivial.
2010-09-13 14:16:46 +00:00
Antoine Pitrou e1dd1747e8 Issue #8411: new condition variable emulation under Windows for the new GIL,
by Kristján.  Unfortunately the 3.x Windows buildbots are in a wreck, so we'll
have to watch them when they become fit again.
2010-08-10 13:48:51 +00:00
Jeffrey Yasskin 39370830a9 Make (most of) Python's tests pass under Thread Sanitizer.
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.
2010-05-03 19:29:34 +00:00
Antoine Pitrou a1d23326b1 Try to strengthen condition-waiting under Windows.
If it doesn't work (doesn't solve erratic freezes) we'll have to resort
to tougher (Windows-only) measures.
2009-11-12 22:56:02 +00:00
Antoine Pitrou cf4cabbe2a Our condition variable emulation under Windows is imperfect, which
seems to be the cause of the buildbot hangs. Try to fix it, and add
some comments.
2009-11-11 18:11:36 +00:00
Antoine Pitrou 074e5ed974 Merge in the new GIL. 2009-11-10 19:50:40 +00:00