aboutsummaryrefslogtreecommitdiff
path: root/include/bh/thread.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/bh/thread.h')
-rw-r--r--include/bh/thread.h11
1 files changed, 5 insertions, 6 deletions
diff --git a/include/bh/thread.h b/include/bh/thread.h
index 598f4f7..7cc92fb 100644
--- a/include/bh/thread.h
+++ b/include/bh/thread.h
@@ -14,12 +14,7 @@ typedef struct bh_task_s bh_task_t;
typedef struct bh_thread_pool_s bh_thread_pool_t;
typedef struct bh_spinlock_s bh_spinlock_t;
-#if defined(BH_USE_PTHREAD)
-bh_thread_t *bh_thread_new(bh_task_t *task);
-
-bh_thread_pool_t *bh_thread_pool_new(size_t size);
-
-#elif defined(BH_USE_WINTHREAD)
+#if defined(BH_PLATFORM_WIN) && defined(BH_PLATFORM_THREADS)
#include <windows.h>
#include <process.h>
@@ -46,6 +41,10 @@ bh_thread_pool_t *bh_thread_pool_new_base(size_t size,
#define bh_thread_pool_new(size) \
bh_thread_pool_new_base((size), _beginthreadex, _endthreadex);
+#elif defined(BH_PLATFORM_THREADS)
+bh_thread_t *bh_thread_new(bh_task_t *task);
+
+bh_thread_pool_t *bh_thread_pool_new(size_t size);
#endif
bh_task_t *bh_task_new(void (*func)(void *),