Implement TLS and spinlocks, fix bug in Windows threads
This commit is contained in:
@@ -367,6 +367,45 @@ int bh_thread_pool_init(bh_thread_pool_t *pool,
|
||||
return BH_NO_IMPL;
|
||||
}
|
||||
|
||||
void bh_spinlock_init(bh_spinlock_t *lock)
|
||||
{
|
||||
lock->handle = 0;
|
||||
}
|
||||
|
||||
void bh_spinlock_destroy(bh_spinlock_t *lock)
|
||||
{
|
||||
(void)lock;
|
||||
}
|
||||
|
||||
int bh_spinlock_lock(bh_spinlock_t *lock)
|
||||
{
|
||||
return BH_NO_IMPL;
|
||||
}
|
||||
|
||||
int bh_spinlock_unlock(bh_spinlock_t *lock)
|
||||
{
|
||||
return BH_NO_IMPL;
|
||||
}
|
||||
|
||||
int bh_spinlock_try_lock(bh_spinlock_t *lock)
|
||||
{
|
||||
return BH_NO_IMPL;
|
||||
}
|
||||
|
||||
bh_tls_info_t *bh_tls_info(void)
|
||||
{
|
||||
static bh_tls_info_t info;
|
||||
|
||||
return &info;
|
||||
}
|
||||
|
||||
bh_tls_t *bh_tls_fetch(void)
|
||||
{
|
||||
static bh_tls_t tls;
|
||||
|
||||
return &tls;
|
||||
}
|
||||
|
||||
/**
|
||||
* \}
|
||||
*/
|
||||
Reference in New Issue
Block a user