From 10d758b91766341bd484790fddbac176753b6cfd Mon Sep 17 00:00:00 2001 From: CoderRC <108188026+CoderRC@users.noreply.github.com> Date: Mon, 3 Apr 2023 16:08:42 -0400 Subject: [PATCH] Change static pthread_create and pthread_join to non static pthread_create and pthread_join --- ggml.c | 4 ++-- ggml.h | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) 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