Change static pthread_create and pthread_join to non static pthread_create and pthread_join

This commit is contained in:
CoderRC 2023-04-03 16:08:42 -04:00 committed by GitHub
parent 0de310a159
commit 10d758b917
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 4 additions and 4 deletions

4
ggml.c
View file

@ -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);
}

4
ggml.h
View file

@ -789,8 +789,8 @@ int ggml_cpu_has_vsx(void);
#include <windows.h>
#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