]> git.djapps.eu Git - pkg/ggml/sources/whisper.cpp/commitdiff
Implemenated sched_yield function for Windows
authorMikhail Grigorev <redacted>
Sun, 30 Oct 2022 10:29:27 +0000 (15:29 +0500)
committerGeorgi Gerganov <redacted>
Sun, 30 Oct 2022 19:38:18 +0000 (21:38 +0200)
ggml.c

diff --git a/ggml.c b/ggml.c
index bd11cc2038366f42ffd11080b471e5efc7789ea0..c59822d88f5e06b43aa3d734aaef5d29e83af732 100644 (file)
--- a/ggml.c
+++ b/ggml.c
@@ -44,6 +44,11 @@ static int pthread_create(pthread_t* out, void* unused, thread_ret_t(*func)(void
 static int pthread_join(pthread_t thread, void* unused) {
     return (int) WaitForSingleObject(thread, INFINITE);
 }
+
+int sched_yield (void) {
+    Sleep (0);
+    return 0;
+}
 #else
 #include <pthread.h>
 #include <stdatomic.h>