aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMiss Islington (bot) <31488909+miss-islington@users.noreply.github.com>2021-10-01 09:51:15 -0700
committerGitHub <noreply@github.com>2021-10-01 18:51:15 +0200
commit0e1aeab5d7de3f328876aea8ccabbc6db146a883 (patch)
treeb25b6c479ac5ab1fffbaa042f1d0600adc9f9751 /pyconfig.h.in
parent[3.9] hashlib: Fix old message about unicode objects. (GH-28653) (GH-28679) (diff)
downloadcpython-0e1aeab5d7de3f328876aea8ccabbc6db146a883.tar.gz
cpython-0e1aeab5d7de3f328876aea8ccabbc6db146a883.tar.bz2
cpython-0e1aeab5d7de3f328876aea8ccabbc6db146a883.zip
bpo-41710: PyThread_acquire_lock_timed() uses sem_clockwait() (GH-28671) (GH-28683)
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. (cherry picked from commit 6df8c327532627d6a99991993c52e8e4a9b34968) Co-authored-by: Victor Stinner <vstinner@python.org>
Diffstat (limited to 'pyconfig.h.in')
-rw-r--r--pyconfig.h.in3
1 files changed, 3 insertions, 0 deletions
diff --git a/pyconfig.h.in b/pyconfig.h.in
index 6358e568f4a..b62e169255d 100644
--- a/pyconfig.h.in
+++ b/pyconfig.h.in
@@ -887,6 +887,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