From 4e6fb0f02de7a71e2788ce01004ba8d19e95e09b Mon Sep 17 00:00:00 2001 From: OBattler Date: Wed, 25 May 2022 23:08:52 +0200 Subject: [PATCH] Tentative implementation of thread_wait_mutex() on Win32 threads. --- src/win/win_thread.c | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/src/win/win_thread.c b/src/win/win_thread.c index 1ad0fc469..f97c5a3db 100644 --- a/src/win/win_thread.c +++ b/src/win/win_thread.c @@ -45,6 +45,16 @@ thread_create(void (*func)(void *param), void *param) } +int +thread_test_mutex(thread_t *arg) +{ + if (arg == NULL) return(0); + + return (WaitForSingleObject(arg, 0) == WAIT_OBJECT_0) ? 1 : 0; +} + + + int thread_wait(thread_t *arg) {