summaryrefslogtreecommitdiffstats
path: root/Python/condvar.h
Commit message (Collapse)AuthorAgeFilesLines
* gh-110014: Fix _POSIX_THREADS and _POSIX_SEMAPHORES usage (#110139)Victor Stinner2023-09-301-1/+2
| | | | | | | | | | | | | | | | * pycore_pythread.h is now the central place to make sure that _POSIX_THREADS and _POSIX_SEMAPHORES macros are defined if available. * Make sure that pycore_pythread.h is included when _POSIX_THREADS and _POSIX_SEMAPHORES macros are tested. * PY_TIMEOUT_MAX is now defined as a constant, since its value depends on _POSIX_THREADS, instead of being defined as a macro. * Prevent integer overflow in the preprocessor when computing PY_TIMEOUT_MAX_VALUE on Windows: replace "0xFFFFFFFELL * 1000 < LLONG_MAX" with "0xFFFFFFFELL < LLONG_MAX / 1000". * Document the change and give hints how to fix affected code. * Add an exception for PY_TIMEOUT_MAX name to smelly.py * Add PY_TIMEOUT_MAX to the stable ABI
* gh-74953: _PyThread_cond_after() uses _PyTime_t (#94056)Victor Stinner2022-06-211-3/+3
| | | | | | pthread _PyThread_cond_after() implementation now uses the _PyTime_t type to handle properly overflow: clamp to the maximum value. Remove MICROSECONDS_TO_TIMESPEC() function.
* bpo-44740: Lowercase "internet" and "web" where appropriate. (#27378)Mariusz Felisiak2021-07-261-1/+1
| | | Co-authored-by: Łukasz Langa <lukasz@langa.pl>
* Typo fix: "throuhgh" should be "through". (GH-16704)Hansraj Das2019-10-111-1/+1
|
* bpo-12822: use monotonic clock for condvar if possible (GH-11723)Inada Naoki2019-02-201-28/+12
|
* bpo-35081: Add pycore_ prefix to internal header files (GH-10263)Victor Stinner2018-10-311-1/+1
| | | | | | | | | | | | | | | | | | | | * Rename Include/internal/ header files: * pyatomic.h -> pycore_atomic.h * ceval.h -> pycore_ceval.h * condvar.h -> pycore_condvar.h * context.h -> pycore_context.h * pygetopt.h -> pycore_getopt.h * gil.h -> pycore_gil.h * hamt.h -> pycore_hamt.h * hash.h -> pycore_hash.h * mem.h -> pycore_mem.h * pystate.h -> pycore_state.h * warnings.h -> pycore_warnings.h * PCbuild project, Makefile.pre.in, Modules/Setup: add the Include/internal/ directory to the search paths of header files. * Update includes. For example, replace #include "internal/mem.h" with #include "pycore_mem.h".
* bpo-30860: Consolidate stateful runtime globals. (#3397)Eric Snow2017-09-081-70/+5
| | | | | | | * group the (stateful) runtime globals into various topical structs * consolidate the topical structs under a single top-level _PyRuntimeState struct * add a check-c-globals.py script that helps identify runtime globals Other globals are excluded (see globals.txt and check-c-globals.py).
* Revert "bpo-30860: Consolidate stateful runtime globals." (#3379)Eric Snow2017-09-061-5/+70
| | | Windows buildbots started failing due to include-related errors.
* bpo-30860: Consolidate stateful runtime globals. (#2594)Eric Snow2017-09-061-70/+5
| | | | | | | | | * group the (stateful) runtime globals into various topical structs * consolidate the topical structs under a single top-level _PyRuntimeState struct * add a check-c-globals.py script that helps identify runtime globals Other globals are excluded (see globals.txt and check-c-globals.py).
* replace PY_LONG_LONG with long longBenjamin Peterson2016-09-061-3/+3
|
* Issue #27895: Spelling fixes (Contributed by Ville Skyttä).Raymond Hettinger2016-08-301-1/+1
|
* Removed unintentional trailing spaces in non-external and non-generated C files.Serhiy Storchaka2015-03-181-3/+3
|
* The PyCOND_TIMEDWAIT must use microseconds for the timeout argumentKristján Valur Jónsson2014-05-081-6/+6
| | | | | | | | in order to have the same resolution as pthreads condition variables. At the same time, it must be large enough to accept 31 bits of milliseconds, which is the maximum timeout value in the windows API. A PY_LONG_LONG of microseconds fullfills both requirements. This closes issue #20737
* Issue #15038 : Fixing the condition broadcast and docs.Kristján Valur Jónsson2013-03-201-6/+6
|
* Replace WaitForSingleObject with WaitForSingleObjectEx,Martin v. Löwis2013-01-251-1/+1
| | | | for better WinRT compatibility.
* Issue #15038: Document caveats with the emulated condition variables.Kristjan Valur Jonsson2012-06-191-0/+29
|
* Issue #15038:Kristjan Valur Jonsson2012-06-191-5/+13
| | | | | | Fix incorrect test of the condition variable state, spotted by Richard Oudkerk. This could cause the internal condition variable to grow without bounds.
* Issue #15038: Optimize python Locks on WindowsKristján Valur Jónsson2012-06-181-0/+353
Extract cross-platform condition variable support into a separate file and provide user-mode non-recursive locks for Windows.