Change static pthread_create and pthread_join to non static pthread_create and pthread_join
This commit is contained in:
parent
0de310a159
commit
10d758b917
2 changed files with 4 additions and 4 deletions
4
ggml.c
4
ggml.c
|
@ -54,7 +54,7 @@ static LONG atomic_fetch_sub(atomic_int* ptr, LONG dec) {
|
||||||
typedef HANDLE pthread_t;
|
typedef HANDLE pthread_t;
|
||||||
|
|
||||||
typedef DWORD thread_ret_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);
|
HANDLE handle = CreateThread(NULL, 0, (LPTHREAD_START_ROUTINE) func, arg, 0, NULL);
|
||||||
if (handle == NULL)
|
if (handle == NULL)
|
||||||
{
|
{
|
||||||
|
@ -65,7 +65,7 @@ static int pthread_create(pthread_t* out, void* unused, thread_ret_t(*func)(void
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
static int pthread_join(pthread_t thread, void* unused) {
|
int pthread_join(pthread_t thread, void* unused) {
|
||||||
return (int) WaitForSingleObject(thread, INFINITE);
|
return (int) WaitForSingleObject(thread, INFINITE);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
4
ggml.h
4
ggml.h
|
@ -789,8 +789,8 @@ int ggml_cpu_has_vsx(void);
|
||||||
#include <windows.h>
|
#include <windows.h>
|
||||||
#endif
|
#endif
|
||||||
typedef HANDLE pthread_t;
|
typedef HANDLE pthread_t;
|
||||||
static int pthread_create(pthread_t* out, void* unused, void*(*func)(void*), void* arg);
|
int pthread_create(pthread_t* out, void* unused, void*(*func)(void*), void* arg);
|
||||||
static int pthread_join(pthread_t thread, void* unused);
|
int pthread_join(pthread_t thread, void* unused);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifdef __cplusplus
|
#ifdef __cplusplus
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue