diff --git a/ggml.c b/ggml.c index 59e84ab45..2a339c42c 100644 --- a/ggml.c +++ b/ggml.c @@ -54,7 +54,7 @@ static LONG atomic_fetch_sub(atomic_int* ptr, LONG dec) { typedef HANDLE pthread_t; typedef DWORD thread_ret_t; -static int pthread_create(pthread_t* out, void* unused, thread_ret_t(*func)(void*), void* arg) { +int pthread_create(pthread_t* out, void* unused, thread_ret_t(*func)(void*), void* arg) { HANDLE handle = CreateThread(NULL, 0, (LPTHREAD_START_ROUTINE) func, arg, 0, NULL); if (handle == NULL) { @@ -65,7 +65,7 @@ static int pthread_create(pthread_t* out, void* unused, thread_ret_t(*func)(void return 0; } -static int pthread_join(pthread_t thread, void* unused) { +int pthread_join(pthread_t thread, void* unused) { return (int) WaitForSingleObject(thread, INFINITE); } diff --git a/ggml.h b/ggml.h index 1f3c396bd..b84dc71b1 100644 --- a/ggml.h +++ b/ggml.h @@ -789,8 +789,8 @@ int ggml_cpu_has_vsx(void); #include #endif typedef HANDLE pthread_t; -static int pthread_create(pthread_t* out, void* unused, void*(*func)(void*), void* arg); -static int pthread_join(pthread_t thread, void* unused); +int pthread_create(pthread_t* out, void* unused, void*(*func)(void*), void* arg); +int pthread_join(pthread_t thread, void* unused); #endif #ifdef __cplusplus