diff options
author | Victor Stinner <vstinner@python.org> | 2021-10-01 16:22:49 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-10-01 16:22:49 (GMT) |
commit | 6df8c327532627d6a99991993c52e8e4a9b34968 (patch) | |
tree | 741232ad7040fe93e59788dcc2a271656e8024f4 /pyconfig.h.in | |
parent | 282992b36f9fe27183037051f3b37210884600af (diff) | |
download | cpython-6df8c327532627d6a99991993c52e8e4a9b34968.zip cpython-6df8c327532627d6a99991993c52e8e4a9b34968.tar.gz cpython-6df8c327532627d6a99991993c52e8e4a9b34968.tar.bz2 |
bpo-41710: PyThread_acquire_lock_timed() uses sem_clockwait() (GH-28671)
On Unix, if the sem_clockwait() function is available in the C
library (glibc 2.30 and newer), the threading.Lock.acquire() method
now uses the monotonic clock (time.CLOCK_MONOTONIC) for the timeout,
rather than using the system clock (time.CLOCK_REALTIME), to not be
affected by system clock changes.
configure now checks if the sem_clockwait() function is available.
Diffstat (limited to 'pyconfig.h.in')
-rw-r--r-- | pyconfig.h.in | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/pyconfig.h.in b/pyconfig.h.in index 49407ab..0559274 100644 --- a/pyconfig.h.in +++ b/pyconfig.h.in @@ -902,6 +902,9 @@ /* Define to 1 if you have the `sched_setscheduler' function. */ #undef HAVE_SCHED_SETSCHEDULER +/* Define to 1 if you have the `sem_clockwait' function. */ +#undef HAVE_SEM_CLOCKWAIT + /* Define to 1 if you have the `sem_getvalue' function. */ #undef HAVE_SEM_GETVALUE |