summaryrefslogtreecommitdiffstats
path: root/configure
diff options
context:
space:
mode:
authorMatt Prodani <mattp@nyu.edu>2024-01-30 21:22:17 (GMT)
committerGitHub <noreply@github.com>2024-01-30 21:22:17 (GMT)
commite5e186609fdd74bc53e8478da22b76440d996baa (patch)
treee9b59d9f6fe02ea4799f1c969467c95a7d749097 /configure
parentfda7445ca50b892955fc31bd72a3615fef1d70c6 (diff)
downloadcpython-e5e186609fdd74bc53e8478da22b76440d996baa.zip
cpython-e5e186609fdd74bc53e8478da22b76440d996baa.tar.gz
cpython-e5e186609fdd74bc53e8478da22b76440d996baa.tar.bz2
gh-112606: Use pthread_cond_timedwait_relative_np() in parking_lot.c when available (#112616)
Add a configure define for HAVE_PTHREAD_COND_TIMEDWAIT_RELATIVE_NP and replaces pthread_cond_timedwait() with pthread_cond_timedwait_relative_np() for relative time when supported in semaphore waiting logic.
Diffstat (limited to 'configure')
-rwxr-xr-xconfigure6
1 files changed, 6 insertions, 0 deletions
diff --git a/configure b/configure
index adc5a8f..7b2119f 100755
--- a/configure
+++ b/configure
@@ -17872,6 +17872,12 @@ then :
printf "%s\n" "#define HAVE_PREADV2 1" >>confdefs.h
fi
+ac_fn_c_check_func "$LINENO" "pthread_cond_timedwait_relative_np" "ac_cv_func_pthread_cond_timedwait_relative_np"
+if test "x$ac_cv_func_pthread_cond_timedwait_relative_np" = xyes
+then :
+ printf "%s\n" "#define HAVE_PTHREAD_COND_TIMEDWAIT_RELATIVE_NP 1" >>confdefs.h
+
+fi
ac_fn_c_check_func "$LINENO" "pthread_condattr_setclock" "ac_cv_func_pthread_condattr_setclock"
if test "x$ac_cv_func_pthread_condattr_setclock" = xyes
then :