From ec59387899700bd1e5a9f30838a570e9e271e341 Mon Sep 17 00:00:00 2001 From: CoderRC <108188026+CoderRC@users.noreply.github.com> Date: Mon, 3 Apr 2023 00:41:39 -0400 Subject: [PATCH] Added threading for non posix systems --- ggml.h | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/ggml.h b/ggml.h index ad962b109..2037ae24e 100644 --- a/ggml.h +++ b/ggml.h @@ -773,6 +773,16 @@ int ggml_cpu_has_blas(void); int ggml_cpu_has_sse3(void); int ggml_cpu_has_vsx(void); +// +// threading for non posix systems +// +#ifndef _POSIX_THREADS +typedef HANDLE pthread_t; +typedef DWORD thread_ret_t; +int pthread_create(pthread_t* out, void* unused, thread_ret_t(*func)(void*), void* arg); +int pthread_join(pthread_t thread, void* unused); +#endif + #ifdef __cplusplus } #endif