aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/Python/thread_pthread.h
diff options
context:
space:
mode:
authorVictor Stinner <vstinner@python.org>2024-02-20 23:16:37 +0100
committerGitHub <noreply@github.com>2024-02-20 22:16:37 +0000
commit52d14775665a6fde518ee3da88a73f39b09d993f (patch)
tree7aa83b307d5af59761a769d4a54746b7a7c81fc2 /Python/thread_pthread.h
parente1fdc3c323bd605f92622b7ee18805885ff0bb4e (diff)
downloadcpython-52d14775665a6fde518ee3da88a73f39b09d993f.tar.gz
cpython-52d14775665a6fde518ee3da88a73f39b09d993f.zip
gh-110850: Rename internal PyTime C API functions (#115734)
Rename functions: * _PyTime_GetSystemClock() => _PyTime_TimeUnchecked() * _PyTime_GetPerfCounter() => _PyTime_PerfCounterUnchecked() * _PyTime_GetMonotonicClock() => _PyTime_MonotonicUnchecked() * _PyTime_GetSystemClockWithInfo() => _PyTime_TimeWithInfo() * _PyTime_GetMonotonicClockWithInfo() => _PyTime_MonotonicWithInfo() * _PyTime_GetMonotonicClockWithInfo() => _PyTime_MonotonicWithInfo() Changes: * Remove "typedef PyTime_t PyTime_t;" which was "typedef PyTime_t _PyTime_t;" before a previous rename. * Update comments of "Unchecked" functions. * Remove invalid PyTime_Time() comment.
Diffstat (limited to 'Python/thread_pthread.h')
-rw-r--r--Python/thread_pthread.h8
1 files changed, 4 insertions, 4 deletions
diff --git a/Python/thread_pthread.h b/Python/thread_pthread.h
index 9db6a4666f5..17f6ae7eb70 100644
--- a/Python/thread_pthread.h
+++ b/Python/thread_pthread.h
@@ -154,12 +154,12 @@ _PyThread_cond_after(long long us, struct timespec *abs)
PyTime_t t;
#ifdef CONDATTR_MONOTONIC
if (condattr_monotonic) {
- t = _PyTime_GetMonotonicClock();
+ t = _PyTime_MonotonicUnchecked();
}
else
#endif
{
- t = _PyTime_GetSystemClock();
+ t = _PyTime_TimeUnchecked();
}
t = _PyTime_Add(t, timeout);
_PyTime_AsTimespec_clamp(t, abs);
@@ -502,7 +502,7 @@ 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_MonotonicUnchecked(), timeout);
_PyTime_AsTimespec_clamp(deadline, &abs_timeout);
}
#else
@@ -518,7 +518,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_TimeUnchecked(),
timeout);
struct timespec ts;
_PyTime_AsTimespec_clamp(abs_time, &ts);