Implement TLS and spinlocks, fix bug in Windows threads

This commit is contained in:
2024-06-10 22:24:57 +03:00
parent 8939076f94
commit ada9d3ada5
10 changed files with 359 additions and 3 deletions

View File

@@ -18,6 +18,11 @@ struct bh_cond_s
void *handle;
};
struct bh_spinlock_s
{
int handle;
};
int bh_thread_init(bh_thread_t *thread,
bh_task_t *task);
@@ -30,4 +35,4 @@ void bh_cond_destroy(bh_cond_t *cond);
int bh_thread_pool_init(bh_thread_pool_t *pool,
size_t size);
void bh_thread_pool_destroy(bh_thread_pool_t *pool);
void bh_thread_pool_destroy(bh_thread_pool_t *pool);