Fix windows compilation issues
This commit is contained in:
@@ -1,3 +1,4 @@
|
||||
#include <windows.h>
|
||||
#include <process.h>
|
||||
|
||||
struct bh_thread_s
|
||||
@@ -19,7 +20,11 @@ struct bh_mutex_s
|
||||
|
||||
struct bh_cond_s
|
||||
{
|
||||
void *handle;
|
||||
CRITICAL_SECTION lock;
|
||||
HANDLE wait;
|
||||
HANDLE done;
|
||||
int waiting;
|
||||
int signals;
|
||||
};
|
||||
|
||||
int bh_thread_init_base(bh_thread_t *thread,
|
||||
|
||||
@@ -16,7 +16,11 @@ typedef struct bh_thread_pool_s bh_thread_pool_t;
|
||||
bh_thread_t *bh_thread_new(bh_task_t *task);
|
||||
|
||||
bh_thread_pool_t *bh_thread_pool_new(size_t size);
|
||||
|
||||
#elif defined(BHLIB_USE_WINTHREAD)
|
||||
#include <windows.h>
|
||||
#include <process.h>
|
||||
|
||||
typedef uintptr_t (__cdecl *bh_thread_begin_cb_t)(void *,
|
||||
unsigned,
|
||||
unsigned (__stdcall *)(void *),
|
||||
@@ -24,7 +28,7 @@ typedef uintptr_t (__cdecl *bh_thread_begin_cb_t)(void *,
|
||||
unsigned,
|
||||
unsigned *);
|
||||
|
||||
typedef uintptr_t (__cdecl *bh_thread_end_cb_t)(unsigned);
|
||||
typedef void (__cdecl *bh_thread_end_cb_t)(unsigned);
|
||||
|
||||
bh_thread_t *bh_thread_new_base(bh_task_t *task,
|
||||
bh_thread_begin_cb_t begin,
|
||||
|
||||
Reference in New Issue
Block a user