From 56c6e19f99044c84ccdc41cc3016996578838c17 Mon Sep 17 00:00:00 2001 From: Arun Raghavan Date: Tue, 3 Jun 2025 15:20:15 +0530 Subject: [PATCH] Revert "spa: loop: Change get_time() timeout to unsigned" This reverts commit c515f9bf8effdda78f4bfa091a8b35b6e7552c1a. The PW APIs use int64_t (partly because SPA_NSEC_PER_SEC is an LL), and we don't want to change already public API. --- spa/include/spa/support/loop.h | 4 ++-- spa/plugins/support/loop.c | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/spa/include/spa/support/loop.h b/spa/include/spa/support/loop.h index 110f4faa1..c6c6df9f7 100644 --- a/spa/include/spa/support/loop.h +++ b/spa/include/spa/support/loop.h @@ -325,7 +325,7 @@ struct spa_loop_control_methods { * Get the current time with \ref timeout that can be used in wait. * Since version 2:2 */ - int (*get_time) (void *object, struct timespec *abstime, uint64_t timeout); + int (*get_time) (void *object, struct timespec *abstime, int64_t timeout); /** Wait for a signal * Wait until a thread performs signal. Since version 2:2 * @@ -404,7 +404,7 @@ SPA_API_LOOP int spa_loop_control_unlock(struct spa_loop_control *object) spa_loop_control, &object->iface, unlock, 2); } SPA_API_LOOP int spa_loop_control_get_time(struct spa_loop_control *object, - struct timespec *abstime, uint64_t timeout) + struct timespec *abstime, int64_t timeout) { return spa_api_method_r(int, -ENOTSUP, spa_loop_control, &object->iface, get_time, 2, abstime, timeout); diff --git a/spa/plugins/support/loop.c b/spa/plugins/support/loop.c index 478e5522c..119c67ec0 100644 --- a/spa/plugins/support/loop.c +++ b/spa/plugins/support/loop.c @@ -657,7 +657,7 @@ static int loop_unlock(void *object) impl->recurse++; return -res; } -static int loop_get_time(void *object, struct timespec *abstime, uint64_t timeout) +static int loop_get_time(void *object, struct timespec *abstime, int64_t timeout) { if (clock_gettime(CLOCK_REALTIME, abstime) < 0) return -errno;