Fix windows build.

Signed-off-by: Pol Henarejos <pol.henarejos@cttc.es>
This commit is contained in:
Pol Henarejos
2026-04-29 15:36:53 +02:00
parent 0abea5b6b2
commit 707cdf7bf4
16 changed files with 185 additions and 90 deletions

View File

@@ -21,6 +21,7 @@
#define _PTHREAD_H_
#include <windows.h>
#include <stdint.h>
#include <stdlib.h>
typedef HANDLE pthread_t;
typedef CRITICAL_SECTION pthread_mutex_t;
@@ -51,6 +52,11 @@ static inline int pthread_mutex_destroy(pthread_mutex_t *m) {
return 0;
}
static inline int pthread_detach(pthread_t t) {
CloseHandle(t);
return 0;
}
// Thread
static DWORD WINAPI thread_entry(LPVOID param) {
void **args = (void **)param;