mirror of
https://github.com/python/cpython.git
synced 2025-12-31 04:23:37 +00:00
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.
This commit is contained in:
parent
fda7445ca5
commit
e5e186609f
4 changed files with 17 additions and 3 deletions
6
configure
generated
vendored
6
configure
generated
vendored
|
|
@ -17871,6 +17871,12 @@ if test "x$ac_cv_func_preadv2" = xyes
|
|||
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
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue