diff options
author | Victor Stinner <vstinner@python.org> | 2024-02-20 15:02:27 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-02-20 15:02:27 (GMT) |
commit | 9af80ec83d1647a472331bd1333a7fa9108fe98e (patch) | |
tree | 855d09a92949b6cbe2b6a9c177bfd399a87a2fa6 /Python/thread_pthread.h | |
parent | 0749244d13412d7cb5b53d834f586f2198f5b9a6 (diff) | |
download | cpython-9af80ec83d1647a472331bd1333a7fa9108fe98e.zip cpython-9af80ec83d1647a472331bd1333a7fa9108fe98e.tar.gz cpython-9af80ec83d1647a472331bd1333a7fa9108fe98e.tar.bz2 |
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")
Diffstat (limited to 'Python/thread_pthread.h')
-rw-r--r-- | Python/thread_pthread.h | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/Python/thread_pthread.h b/Python/thread_pthread.h index 556e3de..ce0af73 100644 --- a/Python/thread_pthread.h +++ b/Python/thread_pthread.h @@ -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); |