Mikhail Grigorev commited on
Commit
12f76e3
·
1 Parent(s): b9db3bf

Implemenated sched_yield function for Windows

Browse files
Files changed (1) hide show
  1. ggml.c +5 -0
ggml.c CHANGED
@@ -44,6 +44,11 @@ static int pthread_create(pthread_t* out, void* unused, thread_ret_t(*func)(void
44
  static int pthread_join(pthread_t thread, void* unused) {
45
  return (int) WaitForSingleObject(thread, INFINITE);
46
  }
 
 
 
 
 
47
  #else
48
  #include <pthread.h>
49
  #include <stdatomic.h>
 
44
  static int pthread_join(pthread_t thread, void* unused) {
45
  return (int) WaitForSingleObject(thread, INFINITE);
46
  }
47
+
48
+ int sched_yield (void) {
49
+ Sleep (0);
50
+ return 0;
51
+ }
52
  #else
53
  #include <pthread.h>
54
  #include <stdatomic.h>