diff options
| author | Greg Funni <gfunni234@gmail.com> | 2025-11-18 15:41:54 +0000 |
|---|---|---|
| committer | Junio C Hamano <gitster@pobox.com> | 2025-11-20 14:45:26 -0800 |
| commit | 2367c6bcd600882d0ea70d4f654c8cfa5c1f53ac (patch) | |
| tree | a2dfc8f1e67fef67202d35051a9164a1a5cd31a0 /compat/win32/pthread.c | |
| parent | 9a2fb147f2c61d0cab52c883e7e26f5b7948e3ed (diff) | |
| download | git-2367c6bcd600882d0ea70d4f654c8cfa5c1f53ac.tar.gz | |
win32: return error if SleepConditionVariableCS fails
If it fails, return an error.
Signed-off-by: Greg Funni <gfunni234@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'compat/win32/pthread.c')
| -rw-r--r-- | compat/win32/pthread.c | 7 |
1 files changed, 7 insertions, 0 deletions
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; +} |
