mirror of
https://github.com/ggerganov/whisper.cpp.git
synced 2025-01-11 16:38:22 +01:00
Implemenated sched_yield function for Windows
This commit is contained in:
parent
dc12994603
commit
6417e59aad
5
ggml.c
5
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>
|
||||
|
Loading…
Reference in New Issue
Block a user