util: Fixes prototype of threads_timespec_compare

using const struct timespec * is enough

Fixes: 45bd24708a ("c11: Improve mtx_timedlock to use timespec_get instead of time(NULL)")
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/9230

Signed-off-by: Yonggang Luo <luoyonggang@gmail.com>
Tested-by: Vinson Lee <vlee@freedesktop.org>
Reviewed-by: Jesse Natalie <jenatali@microsoft.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23753>
This commit is contained in:
Yonggang Luo 2023-06-21 02:49:39 +08:00 committed by Marge Bot
parent 146adbd2f4
commit 65249c6f0a

View file

@ -203,7 +203,7 @@ mtx_lock(mtx_t *mtx)
}
static int
threads_timespec_compare(struct timespec *a, struct timespec *b)
threads_timespec_compare(const struct timespec *a, const struct timespec *b)
{
if (a->tv_sec < b->tv_sec) {
return -1;