mirror of
https://github.com/python/cpython.git
synced 2025-08-22 09:45:06 +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
|
@ -91,7 +91,7 @@ _PySemaphore_Destroy(_PySemaphore *sema)
|
|||
}
|
||||
|
||||
static int
|
||||
_PySemaphore_PlatformWait(_PySemaphore *sema, _PyTime_t timeout)
|
||||
_PySemaphore_PlatformWait(_PySemaphore *sema, PyTime_t timeout)
|
||||
{
|
||||
int res;
|
||||
#if defined(MS_WINDOWS)
|
||||
|
@ -119,13 +119,13 @@ _PySemaphore_PlatformWait(_PySemaphore *sema, _PyTime_t timeout)
|
|||
struct timespec ts;
|
||||
|
||||
#if defined(CLOCK_MONOTONIC) && defined(HAVE_SEM_CLOCKWAIT)
|
||||
_PyTime_t deadline = _PyTime_Add(_PyTime_GetMonotonicClock(), timeout);
|
||||
PyTime_t deadline = _PyTime_Add(_PyTime_GetMonotonicClock(), timeout);
|
||||
|
||||
_PyTime_AsTimespec_clamp(deadline, &ts);
|
||||
|
||||
err = sem_clockwait(&sema->platform_sem, CLOCK_MONOTONIC, &ts);
|
||||
#else
|
||||
_PyTime_t deadline = _PyTime_Add(_PyTime_GetSystemClock(), timeout);
|
||||
PyTime_t deadline = _PyTime_Add(_PyTime_GetSystemClock(), timeout);
|
||||
|
||||
_PyTime_AsTimespec_clamp(deadline, &ts);
|
||||
|
||||
|
@ -162,7 +162,7 @@ _PySemaphore_PlatformWait(_PySemaphore *sema, _PyTime_t timeout)
|
|||
_PyTime_AsTimespec_clamp(timeout, &ts);
|
||||
err = pthread_cond_timedwait_relative_np(&sema->cond, &sema->mutex, &ts);
|
||||
#else
|
||||
_PyTime_t deadline = _PyTime_Add(_PyTime_GetSystemClock(), timeout);
|
||||
PyTime_t deadline = _PyTime_Add(_PyTime_GetSystemClock(), timeout);
|
||||
_PyTime_AsTimespec_clamp(deadline, &ts);
|
||||
|
||||
err = pthread_cond_timedwait(&sema->cond, &sema->mutex, &ts);
|
||||
|
@ -188,7 +188,7 @@ _PySemaphore_PlatformWait(_PySemaphore *sema, _PyTime_t timeout)
|
|||
}
|
||||
|
||||
int
|
||||
_PySemaphore_Wait(_PySemaphore *sema, _PyTime_t timeout, int detach)
|
||||
_PySemaphore_Wait(_PySemaphore *sema, PyTime_t timeout, int detach)
|
||||
{
|
||||
PyThreadState *tstate = NULL;
|
||||
if (detach) {
|
||||
|
@ -283,7 +283,7 @@ atomic_memcmp(const void *addr, const void *expected, size_t addr_size)
|
|||
|
||||
int
|
||||
_PyParkingLot_Park(const void *addr, const void *expected, size_t size,
|
||||
_PyTime_t timeout_ns, void *park_arg, int detach)
|
||||
PyTime_t timeout_ns, void *park_arg, int detach)
|
||||
{
|
||||
struct wait_entry wait = {
|
||||
.park_arg = park_arg,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue