Add internal configuration file, add missing includes, rename some options

This commit is contained in:
2024-06-12 12:09:59 +03:00
parent 5762484550
commit bfa33b3778
15 changed files with 47 additions and 17 deletions

View File

@@ -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 *),