diff options
author | Victor Stinner <vstinner@python.org> | 2024-02-20 22:16:37 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-02-20 22:16:37 (GMT) |
commit | 52d14775665a6fde518ee3da88a73f39b09d993f (patch) | |
tree | 7aa83b307d5af59761a769d4a54746b7a7c81fc2 /Python/lock.c | |
parent | e1fdc3c323bd605f92622b7ee18805885ff0bb4e (diff) | |
download | cpython-52d14775665a6fde518ee3da88a73f39b09d993f.zip cpython-52d14775665a6fde518ee3da88a73f39b09d993f.tar.gz cpython-52d14775665a6fde518ee3da88a73f39b09d993f.tar.bz2 |
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/lock.c')
-rw-r--r-- | Python/lock.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/Python/lock.c b/Python/lock.c index a4b044e..5fa8bf7 100644 --- a/Python/lock.c +++ b/Python/lock.c @@ -5,7 +5,7 @@ #include "pycore_lock.h" #include "pycore_parking_lot.h" #include "pycore_semaphore.h" -#include "pycore_time.h" // _PyTime_GetMonotonicClock() +#include "pycore_time.h" // _PyTime_MonotonicUnchecked() #ifdef MS_WINDOWS # define WIN32_LEAN_AND_MEAN @@ -66,7 +66,7 @@ _PyMutex_LockTimed(PyMutex *m, PyTime_t timeout, _PyLockFlags flags) return PY_LOCK_FAILURE; } - PyTime_t now = _PyTime_GetMonotonicClock(); + PyTime_t now = _PyTime_MonotonicUnchecked(); PyTime_t endtime = 0; if (timeout > 0) { endtime = _PyTime_Add(now, timeout); @@ -143,7 +143,7 @@ mutex_unpark(PyMutex *m, struct mutex_entry *entry, int has_more_waiters) { uint8_t v = 0; if (entry) { - PyTime_t now = _PyTime_GetMonotonicClock(); + PyTime_t now = _PyTime_MonotonicUnchecked(); int should_be_fair = now > entry->time_to_be_fair; entry->handed_off = should_be_fair; |