mirror of
https://github.com/python/cpython.git
synced 2025-08-04 08:59:19 +00:00
gh-110850: Replace _PyTime_t with PyTime_t (#115719)
Run command: sed -i -e 's!\<_PyTime_t\>!PyTime_t!g' $(find -name "*.c" -o -name "*.h")
This commit is contained in:
parent
0749244d13
commit
9af80ec83d
31 changed files with 341 additions and 341 deletions
|
@ -149,8 +149,8 @@ _PyThread_cond_init(PyCOND_T *cond)
|
|||
void
|
||||
_PyThread_cond_after(long long us, struct timespec *abs)
|
||||
{
|
||||
_PyTime_t timeout = _PyTime_FromMicrosecondsClamp(us);
|
||||
_PyTime_t t;
|
||||
PyTime_t timeout = _PyTime_FromMicrosecondsClamp(us);
|
||||
PyTime_t t;
|
||||
#ifdef CONDATTR_MONOTONIC
|
||||
if (condattr_monotonic) {
|
||||
t = _PyTime_GetMonotonicClock();
|
||||
|
@ -481,7 +481,7 @@ PyThread_acquire_lock_timed(PyThread_type_lock lock, PY_TIMEOUT_T microseconds,
|
|||
|
||||
(void) error; /* silence unused-but-set-variable warning */
|
||||
|
||||
_PyTime_t timeout; // relative timeout
|
||||
PyTime_t timeout; // relative timeout
|
||||
if (microseconds >= 0) {
|
||||
// bpo-41710: PyThread_acquire_lock_timed() cannot report timeout
|
||||
// overflow to the caller, so clamp the timeout to
|
||||
|
@ -501,11 +501,11 @@ PyThread_acquire_lock_timed(PyThread_type_lock lock, PY_TIMEOUT_T microseconds,
|
|||
struct timespec abs_timeout;
|
||||
// Local scope for deadline
|
||||
{
|
||||
_PyTime_t deadline = _PyTime_Add(_PyTime_GetMonotonicClock(), timeout);
|
||||
PyTime_t deadline = _PyTime_Add(_PyTime_GetMonotonicClock(), timeout);
|
||||
_PyTime_AsTimespec_clamp(deadline, &abs_timeout);
|
||||
}
|
||||
#else
|
||||
_PyTime_t deadline = 0;
|
||||
PyTime_t deadline = 0;
|
||||
if (timeout > 0 && !intr_flag) {
|
||||
deadline = _PyDeadline_Init(timeout);
|
||||
}
|
||||
|
@ -517,7 +517,7 @@ PyThread_acquire_lock_timed(PyThread_type_lock lock, PY_TIMEOUT_T microseconds,
|
|||
status = fix_status(sem_clockwait(thelock, CLOCK_MONOTONIC,
|
||||
&abs_timeout));
|
||||
#else
|
||||
_PyTime_t abs_time = _PyTime_Add(_PyTime_GetSystemClock(),
|
||||
PyTime_t abs_time = _PyTime_Add(_PyTime_GetSystemClock(),
|
||||
timeout);
|
||||
struct timespec ts;
|
||||
_PyTime_AsTimespec_clamp(abs_time, &ts);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue