From 2367c6bcd600882d0ea70d4f654c8cfa5c1f53ac Mon Sep 17 00:00:00 2001 From: Greg Funni Date: Tue, 18 Nov 2025 15:41:54 +0000 Subject: win32: return error if SleepConditionVariableCS fails If it fails, return an error. Signed-off-by: Greg Funni Signed-off-by: Junio C Hamano --- compat/win32/pthread.c | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'compat/win32/pthread.c') diff --git a/compat/win32/pthread.c b/compat/win32/pthread.c index 58980a529c..7e93146963 100644 --- a/compat/win32/pthread.c +++ b/compat/win32/pthread.c @@ -59,3 +59,10 @@ pthread_t pthread_self(void) t.tid = GetCurrentThreadId(); return t; } + +int pthread_cond_wait(pthread_cond_t *cond, pthread_mutex_t *mutex) +{ + if (SleepConditionVariableCS(cond, mutex, INFINITE) == 0) + return err_win_to_posix(GetLastError()); + return 0; +} -- cgit v1.3-6-g1900